Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to build for iOS
08-26-2013, 01:55 PM
Post: #1
How to build for iOS
After searching around I found some fractional info on how to do this.
Hitting some roadblocks and would like some help to go through it, so that I can compile the procedure within this thread and help other people who want t do the same.

Steps below.

0/ get an apple developper certificate by following the procedure in https://developer.apple.com/register/index.action
[question: is this really needed to build for oneself? I found no way around so ended up doing it, but if somebody knows better please advise]

1/ follow instructions in the page: https://github.com/hrydgard/ppsspp/tree/master/ios
[unfortunately hitting compile critical issues, even after adding the dev certificate to Xcode. Build fails with the below log -> can somebody please help and tell me what's missing/what I'm doing wrong?]


Attached File(s)
.txt  Build target PPSSPP.txt (Size: 9.67 KB / Downloads: 996)
Find all posts by this user
Quote this message in a reply
08-26-2013, 02:11 PM
Post: #2
RE: How to build for iOS
I use a certificate, I think there's other ways but I don't know them.

It looks like you don't have ffmpeg. Do you have files inside ffmpeg/? If not, you may need to run "git submodule update" from Terminal inside where you cloned ppsspp.

-[Unknown]
Find all posts by this user
Quote this message in a reply
08-26-2013, 10:07 PM (This post was last modified: 08-27-2013 12:14 AM by bsauvage.)
Post: #3
RE: How to build for iOS
(08-26-2013 02:11 PM)[Unknown] Wrote:  I use a certificate, I think there's other ways but I don't know them.

It looks like you don't have ffmpeg. Do you have files inside ffmpeg/? If not, you may need to run "git submodule update" from Terminal inside where you cloned ppsspp.

-[Unknown]
I have it (folder ffmpeg is 357.3MB), that was the longest part of the "git submodule update --init" command)

Maybe it's because the ppsspp folder is inside the Desktop, as opposed to the root, so having added the libs with the command makes Xcode look for the libs within ~(root)/ppsspp/ ????

cmake -DCMAKE_TOOLCHAIN_FILE=../ios/ios.toolchain.cmake -GXcode ..
Find all posts by this user
Quote this message in a reply
08-27-2013, 03:52 AM
Post: #4
RE: How to build for iOS
Actually, just wondering whether this is because I never compiled ffmpeg locally yet (so all it has is the uncompressed hierarchy?) ?
Find all posts by this user
Quote this message in a reply
08-27-2013, 11:23 AM
Post: #5
RE: How to build for iOS
(08-27-2013 03:52 AM)bsauvage Wrote:  Actually, just wondering whether this is because I never compiled ffmpeg locally yet (so all it has is the uncompressed hierarchy?) ?
ok so I compiled ffmpeg again
then I ran the cmake command to build the xcode project, got the below errors:
-- Could NOT find Threads (missing: Threads_FOUND)
CMake Warning: Manually-specified variables were not used by the project:CMAKE_TOOLCHAIN_FILE

Now I try to build the debug version and get the below error (still)


Attached File(s)
.txt  Build target PPSSPP.txt (Size: 9.67 KB / Downloads: 1321)
Find all posts by this user
Quote this message in a reply
08-27-2013, 12:16 PM
Post: #6
RE: How to build for iOS
Looks like you are trying to compile for the simulator instead of "ios device"
Find all posts by this user
Quote this message in a reply
08-27-2013, 10:07 PM
Post: #7
RE: How to build for iOS
that's true! (thought that should be the same but apparently not?)

Just tried to compile for iOS device and got only one error this time:

A valid provisioning profile matching the application's Identifier 'com.rock88dev.PPSSPP' could not be found

same error if I try to build for archiving
Find all posts by this user
Quote this message in a reply
08-27-2013, 10:46 PM
Post: #8
RE: How to build for iOS
(I'm not at a computer at the moment, so all of this is from memory. I might have some if the names of things wrong.)

On the top right of the project window should be a button that says Organizer. Click on that and then select the devices tab, and then in the left list should be Provisioning Profiles. Do you have any installed?
Find all posts by this user
Quote this message in a reply
08-28-2013, 11:10 AM
Post: #9
RE: How to build for iOS
(08-27-2013 10:46 PM)jtraynham Wrote:  (I'm not at a computer at the moment, so all of this is from memory. I might have some if the names of things wrong.)

On the top right of the project window should be a button that says Organizer. Click on that and then select the devices tab, and then in the left list should be Provisioning Profiles. Do you have any installed?
That was it! Despite having bought the dev certificate, I didn't import the provisioning profile!
Process is: open the Organizer (top right); go to Devices; connect the iOS device; select it and choose "Add to Portal". Once it's provisionned, select Provisioning Profiles under Library, and at bottom left click Refresh.
[i'll add these steps in the first post]

Now, I still have 3 errors:
"PrioritizedWorkQueue::Flush()", referenced from:
GameInfoCache::Clear() in GameInfoCache.o

"_main", referenced from:
Start in crt1.3.1.o
Symbol(s) not found for architecture armv7

Linker command failed with exit code 1 (use -v to see invocation)
Find all posts by this user
Quote this message in a reply
08-28-2013, 08:50 PM (This post was last modified: 08-28-2013 09:20 PM by bsauvage.)
Post: #10
RE: How to build for iOS
(08-28-2013 11:10 AM)bsauvage Wrote:  
(08-27-2013 10:46 PM)jtraynham Wrote:  (I'm not at a computer at the moment, so all of this is from memory. I might have some if the names of things wrong.)

On the top right of the project window should be a button that says Organizer. Click on that and then select the devices tab, and then in the left list should be Provisioning Profiles. Do you have any installed?
That was it! Despite having bought the dev certificate, I didn't import the provisioning profile!
Process is: open the Organizer (top right); go to Devices; connect the iOS device; select it and choose "Add to Portal". Once it's provisionned, select Provisioning Profiles under Library, and at bottom left click Refresh.
[i'll add these steps in the first post]

Now, I still have 3 errors:
"PrioritizedWorkQueue::Flush()", referenced from:
GameInfoCache::Clear() in GameInfoCache.o

"_main", referenced from:
Start in crt1.3.1.o
Symbol(s) not found for architecture armv7

Linker command failed with exit code 1 (use -v to see invocation)
Well after refreshing the source from Git, it now WORKS!

Updated info in the main post shortly.

Thanks to all !!!!!

now that it has built I'm trying to have it run directly from XCode to the attached iOS device.
First I remove existing ppsspp app (from AngelXwind's repo) and reboot, as otherwise Xcode complains the app is already there with a different bundle.
Then I try Run -> builds, transfers to the device, then opens up. However:
-seems the Run command only allows to build a Debug build, not a release build (faster) -> possible to change that default behaviour ?
-despite having refreshed the git submodules before compiling, the built version is outdated (0.9.1-129 as opposed to -245 now, I believe)-> is it because I built the debug build?
-when building the archive/release version and after having transferred it manually (using iFunBox) and rebooted, the app crashes on open; my guess is because my chmod +x hasn't been successful (I changed to rwx using iFile) -> what's the easiest way to correctly change permissions ?

Thanks!
Find all posts by this user
Quote this message in a reply
08-29-2013, 09:35 PM
Post: #11
RE: How to build for iOS
(08-28-2013 08:50 PM)bsauvage Wrote:  Well after refreshing the source from Git, it now WORKS!

Updated info in the main post shortly.

Thanks to all !!!!!

now that it has built I'm trying to have it run directly from XCode to the attached iOS device.
First I remove existing ppsspp app (from AngelXwind's repo) and reboot, as otherwise Xcode complains the app is already there with a different bundle.

If you want to run both your custom build and the build from AngelXwind, you only need to change one thing:
- In the left pane of the project window, click on the Folder icon to show the Project Navigator, if not already visible.
- Scroll all the way to the top to where you can see the main PPSSPP project and select it.
- Now in the Right/Middle/Main panel, you should see the Project and all the Targets. Select the PPSSPP Target.
- Choose the "Info" tab, and you should see the Custom iOS Target Properties.
- You should see a "Bundle identifier" key with a value of "com.rock88dev.PPSSPP". Change this value to anything else.

You should then be able to run both simultaneously.

(08-28-2013 08:50 PM)bsauvage Wrote:  Then I try Run -> builds, transfers to the device, then opens up. However:
-seems the Run command only allows to build a Debug build, not a release build (faster) -> possible to change that default behaviour ?

Yes. In the top left of the project window next to the stop button is the Scheme double-dropdown. It probably says something like "ALL_BUILD > iOS Device". Click where it says "ALL_BUILD" and select the PPSSPP Scheme. Then click on it again (where it now says "PPSSPP"), and select "Edit Scheme". In the window sheet that comes up, select "Run PPSSPP.app" in the list on the left, and then the "Info" tab on the right. Change the Build Configuration Setting to Release. Now when you hit run, it will compile and run the "Release" build.

(08-28-2013 08:50 PM)bsauvage Wrote:  -despite having refreshed the git submodules before compiling, the built version is outdated (0.9.1-129 as opposed to -245 now, I believe)-> is it because I built the debug build?

I'm not even entirely sure where that version is set. It's possible it's set from the cmake script. Did you re-run the cmake script to recreate the project file when you last updated from git, or did you just open up the previously made project file and run from there?

(08-28-2013 08:50 PM)bsauvage Wrote:  -when building the archive/release version and after having transferred it manually (using iFunBox) and rebooted, the app crashes on open; my guess is because my chmod +x hasn't been successful (I changed to rwx using iFile) -> what's the easiest way to correctly change permissions ?

Thanks!

I just ssh into my device to update the permissions. However, if you modify the scheme like I explain above to compile and install the Release build, you won't have to worry about this.

HTH,
Jake
Find all posts by this user
Quote this message in a reply
08-29-2013, 09:51 PM
Post: #12
RE: How to build for iOS
Fantastic, you solved (nearly) all my problems in one go! Thanks Jake.

To answer your question: yes, I reran the cmake script.

And the last remaining bit is the version: it still mentions 0.9.1-129 ->glitch, or is there another option to sync this properly?
Find all posts by this user
Quote this message in a reply
09-05-2013, 01:58 PM
Post: #13
RE: How to build for iOS
Does anyone know how to display the proper revision?
Find all posts by this user
Quote this message in a reply
09-05-2013, 06:42 PM
Post: #14
RE: How to build for iOS
(09-05-2013 01:58 PM)bsauvage Wrote:  Does anyone know how to display the proper revision?

Looking into it, there is a source file named git-version.cpp, which is generated during the cmake process using the git-version.cmake file in the main directory. So, after doing an update with git, running the iOS cmake command should update that file with the latest version. If not, check the cmake results to see if you see an error about it. Furthermore, it's running this command:

git describe --always

Try running that yourself to see what version number is being returned.

HTH,
Jake
Find all posts by this user
Quote this message in a reply
09-13-2013, 01:04 PM
Post: #15
RE: How to build for iOS
(09-05-2013 06:42 PM)jtraynham Wrote:  
(09-05-2013 01:58 PM)bsauvage Wrote:  Does anyone know how to display the proper revision?

Looking into it, there is a source file named git-version.cpp, which is generated during the cmake process using the git-version.cmake file in the main directory. So, after doing an update with git, running the iOS cmake command should update that file with the latest version. If not, check the cmake results to see if you see an error about it. Furthermore, it's running this command:

git describe --always

Try running that yourself to see what version number is being returned.

HTH,
Jake
I finally got some time to investigate further: running the command returns me the wrong version even after update then cmake
I've got 2 errors during cmake:
-- Could NOT find Threads (missing: Threads_FOUND)

CMake Warning:
Manually-specified variables were not used by the project:

CMAKE_TOOLCHAIN_FILE
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: