Sign in Join
Wiki copytemporary

iPhone/iPod development: what changed

Revision 2 to 3. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
1-*(iOS only)*
1+[![Apple iOS new.svg](https://upload.wikimedia.org/wikipedia/commons/thumb/4/48/Apple_iOS_new.svg/60px-Apple_iOS_new.svg.png)](</File:Apple_iOS_new.svg>)
22
3+This article applies to [iOS](</Category:iOS> "Category:iOS") only.
4+
5+See also: [[Multiplatform Programming Guide]]
6+
7+**English (en)** | [[iPhone/iPod development/ko|**한국어 (ko)**]] | [[iPhone/iPod development/zh CN|**中文(中国大陆) (zh_CN)**]] | [[iPhone/iPod development/zh TW|**中文(臺灣) (zh_TW)**]]
8+
39## Installation
410
5-Requirements:
11+Requirements:
612
7-- Intel Mac (iPhone SDK requirement)
8-- Leopard 10.5.5 or later (iPhone SDK requirement)
9-- iPhone SDK 3.x or later installed (tested with 2.2 - 5.1). **Warning:** there is a bug in the iPhone SDK 3.0 linker. See below for more information.
13+ * Intel Mac (iPhone SDK requirement)
14+ * Leopard 10.5.5 or later (iPhone SDK requirement)
15+ * iPhone SDK 3.x or later installed (tested with 2.2 - 5.1). **Warning:** there is a bug in the iPhone SDK 3.0 linker. See below for more information.
1016
11-Some features:
17+Some features:
1218
13-- Simulator support
14-- the Xcode template transparently supports (requires, actually) integrating Pascal and Objective-C source files into a single application
15-- Pascal translation of the OpenGL ES 1.1 C-header from the SDK (this one we can distribute, because it's licensed under an SGI open source license), available in the gles11 unit
19+ * Simulator support
20+ * the Xcode template transparently supports (requires, actually) integrating Pascal and Objective-C source files into a single application
21+ * Pascal translation of the OpenGL ES 1.1 C-header from the SDK (this one we can distribute, because it's licensed under an SGI open source license), available in the gles11 unit
1622
17-Please read the entire ReadMe.rtf on the installer disk image before asking for help. It contains quite a bit of information on things to watch out for (especially when using the Simulator), and how to change the included template when adding extra Pascal source files.
23+Please read the entire ReadMe.rtf on the installer disk image before asking for help. It contains quite a bit of information on things to watch out for (especially when using the Simulator), and how to change the included template when adding extra Pascal source files.
1824
19-Note that unlike other FPC releases, this installer will install the FPC sources and a script, and will then launch this script in order to compile FPC (after you tell it where you installed the iPhone SDK, so it can generate a Pascal version of some required C headers). This modus operandi is necessary to comply with the iPhone SDK agreement's stipulation that no derived works of the SDK may be distributed. If the script aborts for some reason, you can find it at `/Developer/FreePascalCompiler/2.6.0/InstallScript/finish_fpc_iphone_install.command` to relaunch it. You can download it from the official [download page](http://www.freepascal.org/down/i386/macosx.var).
25+Note that unlike other FPC releases, this installer will install the FPC sources and a script, and will then launch this script in order to compile FPC (after you tell it where you installed the iPhone SDK, so it can generate a Pascal version of some required C headers). This modus operandi is necessary to comply with the iPhone SDK agreement's stipulation that no derived works of the SDK may be distributed. If the script aborts for some reason, you can find it at `/Developer/FreePascalCompiler/2.6.0/InstallScript/finish_fpc_iphone_install.command` to relaunch it. You can download it from the official [download page](<http://www.freepascal.org/down/i386/macosx.var>).
2026
21-If you encounter problems with the script that is launched when the installer finishes the installation, please always provide the entire contents of the Terminal window in which the script was executed when asking for help.
27+If you encounter problems with the script that is launched when the installer finishes the installation, please always provide the entire contents of the Terminal window in which the script was executed when asking for help.
2228
23-(Xcode 4 compatibility: the Xcode templates only work in Xcode 3 only, not in Xcode 4.)
29+(Xcode 4 compatibility: the Xcode templates only work in Xcode 3 only, not in Xcode 4.)
2430
2531### iPhone SDK 3.0
2632
27-The linker included with the iPhone SDK 3.0 contains a bug that is triggered by the Xcode template included with FPC. You can work around this bug by adding -Wl,-no_order_inits to the "Other Linker" flags in the Build settings of the project. This is already done for the Xcode templates included in the 2.4.0rc1 download above, but you may have to do this manually if you are using a project based on a template from a previous snapshot.
33+The linker included with the iPhone SDK 3.0 contains a bug that is triggered by the Xcode template included with FPC. You can work around this bug by adding -Wl,-no_order_inits to the "Other Linker" flags in the Build settings of the project. This is already done for the Xcode templates included in the 2.4.0rc1 download above, but you may have to do this manually if you are using a project based on a template from a previous snapshot.
2834
29-The linker bug has been reported to Apple ([rdar://problem/7120987](http://openradar.appspot.com/7120987)). This problem has been fixed in the Xcode 4 linker.
35+The linker bug has been reported to Apple ([rdar://problem/7120987](<http://openradar.appspot.com/7120987>)). This problem has been fixed in the Xcode 4 linker.
3036
3137### Xcode 4, iOS SDK 5.0, Objective-Pascal
3238
3339For Xcode 4 templates and programming in Objective-Pascal on iOS, see <http://dl.dropbox.com/u/28343282/ObjP/index.html>
3440
3541## Apple's Licence limitations
3642
3743### Signing up to the Apple Developer Program
3844
39-You will eventually need to sign up to Apple's iPhone Developer program (\$99/year) to distribute your programs through the Apple store. This applies to any iPhone application, compiled with FPC or not.
45+You will eventually need to sign up to Apple's iPhone Developer program ($99/year) to distribute your programs through the Apple store. This applies to any iPhone application, compiled with FPC or not.
4046
41-You *do not need to pay the fee* to run applications on your own physical iPhone device. A free developer account will be enough for this, if you use the new XCode versions.
47+You _do not need to pay the fee_ to run applications on your own physical iPhone device. A free developer account will be enough for this, if you use the new XCode versions.
4248
43-Without a developer certificate, you can only run programs on the simulator. (Possibly you can also workaround this if you have a jailbroken iPhone/iPod Touch, but in that case you are on your own.)
49+Without a developer certificate, you can only run programs on the simulator. (Possibly you can also workaround this if you have a jailbroken iPhone/iPod Touch, but in that case you are on your own.)
4450
4551Read more about Apple's iPhone development program here: <http://developer.apple.com/iphone/program/>
4652
4753### Pascal headers required for developing
4854
49-It is against the iPhone SDK agreement to distribute derivative works of this SDK, and this includes Pascal translations of framework headers. So it would be quite a challenge (if possible at all) to create and distribute the sources of a pure Pascal program with a GUI that does not violate the iPhone SDK agreement terms at this time. See the ReadMe.rtf (included in the .dmg above) file for more information
55+It is against the iPhone SDK agreement to distribute derivative works of this SDK, and this includes Pascal translations of framework headers. So it would be quite a challenge (if possible at all) to create and distribute the sources of a pure Pascal program with a GUI that does not violate the iPhone SDK agreement terms at this time. See the ReadMe.rtf (included in the .dmg above) file for more information
5056
5157## Technical Development Limitations
5258
53-At this time is not known whether and if so how it is possible to copy an application to an iPhone/iPod Touch and to execute it without using Xcode. It's of course possible to write the application using any IDE available (Lazarus, Lightweight IDE, etc) and it should also be possible to make any of them work with the Simulator. However, any application has to be built by Xcode for it to be uploaded to the Device and to debug it.
59+At this time is not known whether and if so how it is possible to copy an application to an iPhone/iPod Touch and to execute it without using Xcode. It's of course possible to write the application using any IDE available (Lazarus, Lightweight IDE, etc) and it should also be possible to make any of them work with the Simulator. However, any application has to be built by Xcode for it to be uploaded to the Device and to debug it.
5460
5561### iPhone Simulator is not iPhone
5662
57-The iPhone Simulator makes the iPhone OS API in available to regular Mac applications, thereby mimicking the environment that the devices provide. By allowing you to run your applications in macOS, the simulator provides a way to quickly test your application’s functionality without the need for an actual device. However, running applications on the simulator is not the same as running them on devices.
63+The iPhone Simulator makes the iPhone OS API in available to regular Mac applications, thereby mimicking the environment that the devices provide. By allowing you to run your applications in macOS, the simulator provides a way to quickly test your application’s functionality without the need for an actual device. However, running applications on the simulator is not the same as running them on devices.
5864
59-The simulator uses macOS versions of the low-level iPhone OS frameworks instead of the versions that run on devices. In general, the simulator is a good tool for performing initial testing of your application. Keep however in mind that, because the simulator does not emulate device functionality, you must always perform final testing and performance analysis of your application on actual devices. The main reason is that programs running under the simulator can also transparently use any other frameworks/functionality used by the host macOS operating system, which may not be available on the device.
65+The simulator uses macOS versions of the low-level iPhone OS frameworks instead of the versions that run on devices. In general, the simulator is a good tool for performing initial testing of your application. Keep however in mind that, because the simulator does not emulate device functionality, you must always perform final testing and performance analysis of your application on actual devices. The main reason is that programs running under the simulator can also transparently use any other frameworks/functionality used by the host macOS operating system, which may not be available on the device.
6066
6167## Compiling and running pure Pascal applications on an iPhone/iPod Touch
6268
63-Plain command line applications work fine on the iPhone/iPod Touch, except that the output will only be visible in the gdb console (if run or debugged from Xcode; press cmd-shift-r, or select Run-\>Console) or in the device's console log (if started from the iPhone/iPod Touch itself). In case of GUI applications, you will probably require non-distributable header translations due to licensing restrictions as outlined above. You can however still use your own private Pascal header translations (possible generated by an automated tool).
69+Plain command line applications work fine on the iPhone/iPod Touch, except that the output will only be visible in the gdb console (if run or debugged from Xcode; press cmd-shift-r, or select Run->Console) or in the device's console log (if started from the iPhone/iPod Touch itself). In case of GUI applications, you will probably require non-distributable header translations due to licensing restrictions as outlined above. You can however still use your own private Pascal header translations (possible generated by an automated tool).
6470
6571#### Using only Xcode
6672
67-1. Create a new project based on the template
68-2. Remove all files except for *Prefix.pch, Info.plist, Frameworks and Products from the project
69-3. Add your own Pascal sources (Project-\>Add to Project...)
70-4. Double-click on the project icon at the top left in the Xcode file list, go to the `Build` tab, and change the `FPC_MAIN_FILE` setting to the name of the test program you added (for all configurations).
71-5. Build the program
73+ 1. Create a new project based on the template
74+ 2. Remove all files except for *Prefix.pch, Info.plist, Frameworks and Products from the project
75+ 3. Add your own Pascal sources (Project->Add to Project...)
76+ 4. Double-click on the project icon at the top left in the Xcode file list, go to the `Build` tab, and change the `FPC_MAIN_FILE` setting to the name of the test program you added (for all configurations).
77+ 5. Build the program
7278
7379#### Combining command-line compilation and Xcode
7480
75-If you compile a program on the command line (for Darwin/ARM) and copy it over the built binary in an Xcode project, then if you "run" the program in Xcode, it will code sign and run the binary that you copied over rather than the original program (just make sure that the binary in Xcode has been compiled recently so there are no changes that trigger Xcode to relink it). You can do this using a project based on the default template, without changing anything to the project.
81+If you compile a program on the command line (for Darwin/ARM) and copy it over the built binary in an Xcode project, then if you "run" the program in Xcode, it will code sign and run the binary that you copied over rather than the original program (just make sure that the binary in Xcode has been compiled recently so there are no changes that trigger Xcode to relink it). You can do this using a project based on the default template, without changing anything to the project.
7682
77-You can find the Xcode binary's location by opening the `Products` folder in the project overview, right-clicking (ctrl-clicking) on the .app file and selecting "Reveal in Finder". The binary's location is then in program.app/Contents/MacOS (replace `program.app` with the actual name of the folder selected in the finder). Just overwrite whatever file is in this `MacOS` folder with the program you compiled (e.g. using the command line `cp` program).
83+You can find the Xcode binary's location by opening the `Products` folder in the project overview, right-clicking (ctrl-clicking) on the .app file and selecting "Reveal in Finder". The binary's location is then in program.app/Contents/MacOS (replace `program.app` with the actual name of the folder selected in the finder). Just overwrite whatever file is in this `MacOS` folder with the program you compiled (e.g. using the command line `cp` program).
7884
79-To compile for Darwin/ARM on the command line (replace "Developer" with the directory in which you installed the SDK):
85+To compile for Darwin/ARM on the command line (replace "Developer" with the directory in which you installed the SDK):
8086
8187**for FPC 2.6.0:**
82-
83-```text
84- ppcarm -Cparmv6 -Cfvfpv2 -FD/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin -XR/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk program.pas
8588```
86-
87-for iPhoneSimulator ( OS_TARGET has been introduced)
89+ppcarm -Cparmv6 -Cfvfpv2 -FD/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin -XR/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk program.pas
90+```
8891
89-```text
90- ppc386 -Tiphonesim -XR/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk program.pas
92+for iPhoneSimulator ( OS_TARGET has been introduced)
9193```
94+ppc386 -Tiphonesim -XR/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk program.pas
95+```
9296
9397**prior to FPC 2.6.0:**
94-
95-```text
96- ppcarm -FD/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin -XR/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk program.pas
9798```
98-
99-for iPhoneSimulator
99+ppcarm -FD/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin -XR/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk program.pas
100+```
100101
101-```text
102- ppc386 -XR/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk program.pas
102+for iPhoneSimulator
103103```
104+ppc386 -XR/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk program.pas
105+```
104106
105107## Compiling and running pure Pascal applications on iPhone simulator
106108
107-Compiling and linking requires a regular ppc386 compiler. There is little difference between an iPhone Simulator and a regular macOS application, except that iPhoneSim applications are linked to different frameworks compared to regular macOS applications.
108-
109-Starting with FPC 2.6.0 **iphonesim** target has been introduced. For SDKs 3.2 and higher fpc packages needs to be compiled for iphonesim target ([see \#17470](http://bugs.freepascal.org/view.php?id=17470)). Reasoning: while FPC compile is still pretty much the same (i386 target), different Objective-C ABI is used. For darwin-i386 FPC is using ObjC1 (to be compatible with OSX 10.4 and earlier), while iphonesim-i386 required ObjC2 only. (It seems like previous versions of iPhoneSim SDK 2.x and 3.0 allows ObjC1)
109+Compiling and linking requires a regular ppc386 compiler. There is little difference between an iPhone Simulator and a regular macOS application, except that iPhoneSim applications are linked to different frameworks compared to regular macOS applications.
110110
111-Some frameworks are iPhone-specific (UIKit), other frameworks exist for both macOS and the iOS (CoreFoundation, CoreGraphics, etc). The iPhoneSim SDK provides its own versions of these frameworks. In order to ensure that the SDK's versions of these frameworks are used, you have to to tell the compiler to use appropriate SDK (just like when compiling applications for a real device):
111+Starting with FPC 2.6.0 **iphonesim** target has been introduced. For SDKs 3.2 and higher fpc packages needs to be compiled for iphonesim target ([see #17470](<http://bugs.freepascal.org/view.php?id=17470>)). Reasoning: while FPC compile is still pretty much the same (i386 target), different Objective-C ABI is used. For darwin-i386 FPC is using ObjC1 (to be compatible with OSX 10.4 and earlier), while iphonesim-i386 required ObjC2 only. (It seems like previous versions of iPhoneSim SDK 2.x and 3.0 allows ObjC1)
112112
113-```text
114- fpc simtest.pas -XR/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk
113+Some frameworks are iPhone-specific (UIKit), other frameworks exist for both macOS and the iOS (CoreFoundation, CoreGraphics, etc). The iPhoneSim SDK provides its own versions of these frameworks. In order to ensure that the SDK's versions of these frameworks are used, you have to to tell the compiler to use appropriate SDK (just like when compiling applications for a real device):
115114```
115+fpc simtest.pas -XR/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk
116+```
116117
117-where */Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk* is the root of an iPhoneSim SDK folder. This directory can vary depending on where you have installed the iPhone SDK.
118+where _/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk_ is the root of an iPhoneSim SDK folder. This directory can vary depending on where you have installed the iPhone SDK.
118119
119-There are a at least 3 versions of iPhone SDK available: 2.2.1, 3.0, 3.1. Depending on the version you need, the path changes:
120+There are a at least 3 versions of iPhone SDK available: 2.2.1, 3.0, 3.1. Depending on the version you need, the path changes:
120121
121-- SDK version 2.2.1: */Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.1.sdk*
122-- SDK version 3.0: */Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk*
122+ * SDK version 2.2.1: _/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.1.sdk_
123+ * SDK version 3.0: _/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk_
123124
124-etc.
125+etc.
125126
126127## Building an ARM Cross-compiler
127128
128-The downloadable FPC/iPhone package contains a *ppcarm* cross-compiler to build iPhone applications. Should you wish to compile a newer version of the compiler and units from the latest svn sources later on, you can follow these steps:
129-
130-**Requirements:** The iOS SDK must be installed via a standard Xcode developer tools installation and the path to the SDK must contain no spaces.
129+The downloadable FPC/iPhone package contains a _ppcarm_ cross-compiler to build iPhone applications. Should you wish to compile a newer version of the compiler and units from the latest svn sources later on, you can follow these steps:
131130
132-1\) copy */Developer/FreePascalCompiler/2.6.0/Source/rtl/darwin/arm/sig_cpu.inc* to the *rtl/darwin/arm* directory of your svn checkout (that file was generated when you installed the FPC iPhone SDK integration kit)
131+**Requirements:** The iOS SDK must be installed via a standard Xcode developer tools installation and the path to the SDK must contain no spaces.
133132
134-2\) in the top level fpc directory of your checkout, execute the following commands (in the first line, replace */Developer* with the name of the actual directory where you installed the iPhone SDK, and in the second like replace *iPhoneOS4.2.sdk* with the actual SDK you want to target)
133+1) copy _/Developer/FreePascalCompiler/2.6.0/Source/rtl/darwin/arm/sig_cpu.inc_ to the _rtl/darwin/arm_ directory of your svn checkout (that file was generated when you installed the FPC iPhone SDK integration kit)
135134
136-```text
137- export IPHONEPLATFORMBASEDIR=/Developer/Platforms/iPhoneOS.platform/Developer
138- make FPC=/usr/local/lib/fpc/2.6/0/ppc386 CPU_TARGET=arm CROSSOPT="-FD${IPHONEPLATFORMBASEDIR}/usr/bin -XR${IPHONEPLATFORMBASEDIR}/SDKs/iPhoneOS4.2.sdk/ -ap -Cfvfpv2" all
135+2) in the top level fpc directory of your checkout, execute the following commands (in the first line, replace _/Developer_ with the name of the actual directory where you installed the iPhone SDK, and in the second like replace _iPhoneOS4.2.sdk_ with the actual SDK you want to target)
139136```
140-
141-3\) to install it afterwards (again, replace the SDK path as appropriate):
137+export IPHONEPLATFORMBASEDIR=/Developer/Platforms/iPhoneOS.platform/Developer
138+ make FPC=/usr/local/lib/fpc/2.6/0/ppc386 CPU_TARGET=arm CROSSOPT="-FD${IPHONEPLATFORMBASEDIR}/usr/bin -XR${IPHONEPLATFORMBASEDIR}/SDKs/iPhoneOS4.2.sdk/ -ap -Cfvfpv2" all
139+```
142140
143-```text
144- sudo make FPC=`pwd`/compiler/ppcrossarm OPT="-ap" CPU_TARGET=arm CROSSOPT="-FD${IPHONEPLATFORMBASEDIR}/usr/bin -XR${IPHONEPLATFORMBASEDIR}/SDKs/iPhoneOS4.2.sdk/ -ap" install CROSSINSTALL=1
145- sudo ln -sf ../lib/fpc/2.5.1/ppcrossarm /usr/local/bin/ppcarm
141+3) to install it afterwards (again, replace the SDK path as appropriate):
146142```
143+sudo make FPC=`pwd`/compiler/ppcrossarm OPT="-ap" CPU_TARGET=arm CROSSOPT="-FD${IPHONEPLATFORMBASEDIR}/usr/bin -XR${IPHONEPLATFORMBASEDIR}/SDKs/iPhoneOS4.2.sdk/ -ap" install CROSSINSTALL=1
144+ sudo ln -sf ../lib/fpc/2.5.1/ppcrossarm /usr/local/bin/ppcarm
145+```
147146
148-(possibly with an INSTALL_PREFIX=xyz at the end of the "sudo make" line to install it under "xyz" rather than under /usr/local -- in that case, also adjust the "ln" command afterwards)
147+(possibly with an INSTALL_PREFIX=xyz at the end of the "sudo make" line to install it under "xyz" rather than under /usr/local -- in that case, also adjust the "ln" command afterwards)
149148
150149## iOS 8.0 and later
151150
152-Apple requires everyone to use 64-bit applications for iOS 8.0 (and later). Also iPhone Simulator for iOS 8.0 is 64-bit only.
153-
154-Whenever you compile a project you'll need to use the proper SDK and proper bin utilities. Note that for iPhone Simulator, there's also its own set of bin utilities, not compatible with default macOS bin utilities.
151+Apple requires everyone to use 64-bit applications for iOS 8.0 (and later). Also iPhone Simulator for iOS 8.0 is 64-bit only.
155152
156-Example
153+Whenever you compile a project you'll need to use the proper SDK and proper bin utilities. Note that for iPhone Simulator, there's also its own set of bin utilities, not compatible with default macOS bin utilities.
157154
158-```text
155+Example
156+```
159157export SDK_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
160-export BIN_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/
161-
162-ppcx64 -Tiphonesim -Px86_64 -Scghi -O1 -va -XR$SDK_PATH -FD$BIN_PATH iphoneproj.pas
158+ export BIN_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/
159+
160+ ppcx64 -Tiphonesim -Px86_64 -Scghi -O1 -va -XR$SDK_PATH -FD$BIN_PATH iphoneproj.pas
163161```
164162
165-Note that using "-va" parameter (show all messages) which helps to know whether you're using the right path for bin utilities and SDK. The desired result is that ctrl.o library and ld tool are found in a proper target platform, similar to shown below.
166-
167-```text
163+Note that using "-va" parameter (show all messages) which helps to know whether you're using the right path for bin utilities and SDK. The desired result is that ctrl.o library and ld tool are found in a proper target platform, similar to shown below.
164+```
168165[0.437] Linking iphoneproj
169-[0.481] Searching file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/crt1.o... found
170-[0.481] Searching file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ld... found
166+ [0.481] Searching file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/crt1.o... found
167+ [0.481] Searching file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ld... found
171168```
172169
173-If the path is not found then FPC will fallback to system-wide defaults (macOS target) and the linking is likely to fail.
170+If the path is not found then FPC will fallback to system-wide defaults (macOS target) and the linking is likely to fail.
174171
175172## More information
176173
177-- [Simple iPhone example using FreePascal and SDL](http://freeze-dev.de/blog/?p=492)
174+ * [Simple iPhone example using FreePascal and SDL](<http://freeze-dev.de/blog/?p=492>)
178175
179176## See Also
180177
181-- [[iPhone headers translator]]
178+ * [[iPhone headers translator]]
182179
183180## External Links
184181
185-- [Simon Choi's Basic Tutorial for Clean Installation for iOS 8.2](https://blog.naver.com/simonsayz/220305479793)
186-- [Simon Choi's Basic Tutorial for Clean Installation for iOS 11.2.5](https://blog.naver.com/simonsayz/221209784815)
187-- [The primary Apple frameworks headers parser (used for FPC package)](https://github.com/genericptr/Framework-Parser)
188-- [Tips for Castle game engine project compilation for iOS](https://github.com/castle-engine/castle-engine/wiki/iOS)
182+ * [Simon Choi's Basic Tutorial for Clean Installation for iOS 8.2](<https://blog.naver.com/simonsayz/220305479793>)
183+ * [Simon Choi's Basic Tutorial for Clean Installation for iOS 11.2.5](<https://blog.naver.com/simonsayz/221209784815>)
184+ * [The primary Apple frameworks headers parser (used for FPC package)](<https://github.com/genericptr/Framework-Parser>)
185+ * [Tips for Castle game engine project compilation for iOS](<https://github.com/castle-engine/castle-engine/wiki/iOS>)
189186
190187---
191-*From the Free Pascal wiki, page "iPhone/iPod development", as it stood on 2020-08-01 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
188+*From the Free Pascal wiki, page "iPhone/iPod development", as the Internet Archive kept it on 2026-02-06, last changed on 2020-08-02. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history