How to publish iOS applications from a PC?

1,420 views
Skip to first unread message

Joshua Granick

unread,
Mar 14, 2012, 2:08:03 AM3/14/12
to haxe...@googlegroups.com
Hi everyone!

I'm curious how it might be possible to create and publish applications
for iOS, while using a PC?

Honestly, I'm tired of having to haul around a Mac to do it.


Scenario A

Let's say I have a Mac I can access remotely. Is there a way I could put a
compiled IPA on an iPod from a PC? iTunes? Would it require jailbreaking?


Scenario B

Let's say I want to build the app locally. Is running Neko on iOS a crazy
idea?

Tony Polinelli

unread,
Mar 14, 2012, 2:19:40 AM3/14/12
to haxe...@googlegroups.com
DiskAid gives you access to the iphone filesystem - you could look). If you have a mac return you the ipa (with remote access) then i couldnt see why you can install it (somehow)  - is an ipa a zip? (just thinking of ID .pak files ;P )

or you could just make a hackintosh ;P 





Baluta Cristian

unread,
Mar 14, 2012, 3:19:26 AM3/14/12
to haxe...@googlegroups.com
if you have the ipa you can drag it into itunes along with an adhoc provision profile and sync. If is not working, will work with a zipped ipa.
Băluță Cristian
http://ralcr.com
http://imagin.ro

Philippe Elsass

unread,
Mar 14, 2012, 4:50:09 AM3/14/12
to haxe...@googlegroups.com
From a PC, check iFunBox - fastest way to upload an IPA without having to change things like the app version number.
Works even better with a jailbreaked iThing.

Neko target would be interesting - you could imagine, like Spaceport.io, to upload the app to the device instead of going through the IPA pain. Still neko is apparently a bit slow...
Philippe

Hugh

unread,
Mar 14, 2012, 4:53:10 AM3/14/12
to haXe
Hi,
Another idea I had was to make our own "pak" format, with .so and
assets. You could then download this from anywhere (web) and it would
run in our bootstrap program, which would need to be installed.
I wonder if you could build avmv6/v7 .so hxcpp file from the android
tools + suitable flags?

The app could not go through the app-store (bacuase it used shared
libraries), but if you were a developer or jail-breaker, perhaps you
could put it in yourself. There is also "test-flight" - not sure how
this works.

Hugh

On Mar 14, 3:19 pm, Baluta Cristian <cristi.bal...@gmail.com> wrote:
> if you have the ipa you can drag it into itunes along with an adhoc
> provision profile and sync. If is not working, will work with a zipped ipa.
>
> On Wed, Mar 14, 2012 at 6:19 AM, Tony Polinelli <to...@touchmypixel.com>wrote:
>
>
>
>
>
>
>
>
>
> > DiskAid gives you access to the iphone filesystem - you could look). If
> > you have a mac return you the ipa (with remote access) then i couldnt see
> > why you can install it (somehow)  - is an ipa a zip? (just thinking of ID
> > .pak files ;P )
>
> > or you could just make a hackintosh ;P
>
> > On Wed, Mar 14, 2012 at 5:08 PM, Joshua Granick <
> > bulkm...@joshuagranick.com> wrote:
>
> >> Hi everyone!
>
> >> I'm curious how it might be possible to create and publish applications
> >> for iOS, while using a PC?
>
> >> Honestly, I'm tired of having to haul around a Mac to do it.
>
> >> Scenario A
>
> >> Let's say I have a Mac I can access remotely. Is there a way I could put
> >> a compiled IPA on an iPod from a PC? iTunes? Would it require jailbreaking?
>
> >> Scenario B
>
> >> Let's say I want to build the app locally. Is running Neko on iOS a crazy
> >> idea?
>
> >> --
> >> To post to this group haxe...@googlegroups.com
> >>http://groups.google.com/**group/haxelang?hl=en<http://groups.google.com/group/haxelang?hl=en>

Baluta Cristian

unread,
Mar 14, 2012, 5:14:17 AM3/14/12
to haxe...@googlegroups.com
Testflight is cool, you get the app through email but you need to upload your ipa first, and i don't think they have an api for that. Is good to send for testing purpose to multiple devices anywhere.

Baluta Cristian
http://imagin.ro

Philippe Elsass

unread,
Mar 14, 2012, 6:04:26 AM3/14/12
to haxe...@googlegroups.com
I thought it wasn't possible to dynamically load executable code on iOS?
But if it's possible then it would be a great solution for development.

Testflight is cool but it requires valid IPAs - also provisioning is controlled during upload. It's really a testers deployment tool.
Philippe

Hugh

unread,
Mar 14, 2012, 7:32:30 AM3/14/12
to haXe
Hi,
Well, you can do it (ie, system libraries) not from an app-store app
(they check for that sort of thing).
I wonder if you can load a file from the application area, or only
from the /usr/lib area.

I guess a small experiment may answer the question.

Would be interesting too if we can use android binaries - not sure
about the binary file format - but this would be a pretty good
solution.

Hugh

On Mar 14, 6:04 pm, Philippe Elsass <philippe.els...@gmail.com> wrote:
> I thought it wasn't possible to dynamically load executable code on iOS?
> But if it's possible then it would be a great solution for development.
>
> Testflight is cool but it requires valid IPAs - also provisioning is
> controlled during upload. It's really a testers deployment tool.
>
> On Wed, Mar 14, 2012 at 10:14 AM, Baluta Cristian
> <cristi.bal...@gmail.com>wrote:
>
>
>
>
>
>
>
>
>
> > Testflight is cool, you get the app through email but you need to upload
> > your ipa first, and i don't think they have an api for that. Is good to
> > send for testing purpose to multiple devices anywhere.
>
> > Baluta Cristian
> >http://imagin.ro
>

Joshua Granick

unread,
Mar 14, 2012, 1:02:53 PM3/14/12
to haxe...@googlegroups.com
This is a very interesting idea

If the Android NDK cannot create binaries which are compatible, the
CodeSourcery G++ toolchain (which webOS uses) is a more generic compiler..


When I'm running on a Mac, I can deploy and run to the iPhone simulator
with one command, but always have to build manually using XCode if I want
to deploy to a device. I'm sure there's a way to take the release builds
(which I can create using xcodebuild) and add provisioning, package and
(hopefully?) deploy and run without doing it manually in XCode.


On a PC, I just want to see something running on the device.


--
Using Opera's revolutionary email client: http://www.opera.com/mail/

Rob Fell

unread,
Mar 14, 2012, 1:12:00 PM3/14/12
to haxe...@googlegroups.com
Would anyone else want to chip in and lease a hosted mac server between a group of us?  From there we can add some build tools to transfer our projects from local PC to remote, build and return (for transfer to device for testing from iTunes).  Potentially could push to Store(s) removing any need for our own macs or local SDKs?  Might lead to some interesting places.
 
Not cheap unfortunately, and not in the usual stack of virtual images available elsewhere.  Some quick research revealed:

Philippe Elsass

unread,
Mar 14, 2012, 1:33:10 PM3/14/12
to haxe...@googlegroups.com
I suppose an xserver isn't enough for building apps - can you install & run xcode on it?

--



--
Philippe

Baluta Cristian

unread,
Mar 14, 2012, 1:34:43 PM3/14/12
to haxe...@googlegroups.com
Building for release or adhoc would not be possible without a device connected, but even if you have it the provision profile is associated with an account and a single computer, so it's not possible to build releases from my aacount for your account.

Mac is awesome, why do you run from it people? Also, xcode is the fastest editor ever, you write 2 letters and is already guessing what you want to do.


--



--

Raphael Harmel

unread,
Mar 14, 2012, 1:55:46 PM3/14/12
to haxe...@googlegroups.com
Joshua,

This concerns scenario A.

While working on iOS target with Cocktail on a PC, the simplest way I
found to install my apps on my iDevice was to use over the air (OTA)
installation.
Basically you create a specific html file, which calls a plist list,
which make a link to your IPA file.
You then just have to access the html page from your device to install it.
These file can be generated via Xcode (which I did not try), or
manually (which I did)
This is what Testflight is using, but they add a beta-tester dimension
which does not seem necessary in your case.

As a result the steps I had to do were:
1. to compile the ipa
2. upload it on a web server (which could be automatized)
3. access the link with my iDevice

On non-jalibreaked devices you need to have a valid provisionning
file, but no need on a jailbreaked one.

More info here:
http://hectorramos.com/automating-ios-over-air-beta-deployment/

The result for the "simple cocktail demo":
http://demos.silexlabs.org/cocktail/simple-webapp/native_apps/WebApp_iOS_PhoneGap_OTA_install.html

The detailes files are accessible here:
https://github.com/codam/Cocktail/tree/develop/demo/simple-webapp/bin/native_apps
and here:
http://demos.silexlabs.org/cocktail/simple-webapp/native_apps

Raph

Kevin Newman

unread,
Mar 14, 2012, 2:18:15 PM3/14/12
to haxe...@googlegroups.com
If you can get your IPA signed properly (with a legit provision) you
don't need to jailbreak.

You can use these to install it on your provisioned iOS devices:
- iPhone configuration utility (flaky on 64bit windows).
- iTunes - slow but it works.
- https://testflightapp.com/

Test Flight uses install from URL (I think they call it OTA in iOS docs)
functionality, which you could actually setup yourself (it still
requires proper provisioning, etc.).

Kevin N.

Joshua Granick

unread,
Mar 14, 2012, 3:04:00 PM3/14/12
to haxe...@googlegroups.com
I know everyone has their preferences... I love my 13.3" Sony laptop so
much more than the MacBook Pro I had :)

A few perks:

- Blu-Ray drive
- Higher resolution screen
- Faster GPU
- Better (in my experience) performance
- 14 hour battery life (literally!)

To top it off, I got it for $650 refurbished, since its a late 2011 model.

> --Băluță Cristian

--

Joshua Granick

unread,
Mar 14, 2012, 3:09:17 PM3/14/12
to haxe...@googlegroups.com
This would be interesting if it could hook up to TestFlight automatically.

This can't be a problem other people haven't solved already...

Alex Liebert

unread,
Mar 14, 2012, 3:11:27 PM3/14/12
to haxe...@googlegroups.com
I use testflight daily.  It won't enable building from windows though.

What about this? It's commercial I guess but would be interesting to see if we  can mimic how they achieved it- it allows you to build full iphone bins from windows / vstudio:


Building IPAs from windows for haxe would be an incredible feature - as long as it didn't require a jailbreak, would speed development a lot - even if for final app store builds you needed to build from xcode since you need a mac to upload final binaries anyway.

Alex

Joshua Granick

unread,
Mar 14, 2012, 3:16:39 PM3/14/12
to haxe...@googlegroups.com
That *is* interesting...

Philippe Elsass

unread,
Mar 14, 2012, 3:24:39 PM3/14/12
to haxe...@googlegroups.com
Wow I'd be curious to try this solution for building iOS apps on Windows! 

And let's not start a discussion about the respective benefits of Win and OSX (and Linux) please. Everybody should be able to use whatever they like.
Philippe

Alex Liebert

unread,
Mar 14, 2012, 3:43:16 PM3/14/12
to haxe...@googlegroups.com
The technical details are a little outside my area of expertise for this, however if it's effective I'd love to see a haXe compatibility layer or something.  If someone smarter than me like Hugh or Joshua wants to evaluate it and thinks it could work, I'll happily donate a license for the purpose of making it work with haXe.

Alex

Kevin Newman

unread,
Mar 14, 2012, 4:16:48 PM3/14/12
to haxe...@googlegroups.com
I know Adobe has been able to build iOS apps from Windows for a while
(their iPhone packager thingy) - so it is doable. I haven't tried it
yet, but I think you still need a mac to submit to the app store.
Testing and ad-hoc works from Windows with their tool.

Kevin N.

Alex Liebert

unread,
Mar 14, 2012, 4:32:47 PM3/14/12
to haxe...@googlegroups.com
Adobe's solution actually uses custom llvm (I think) and converts swf bytecode to ARM instructions, then does the signing etc.  This applies to their release/ad hoc build processes, ie, ready for distribution.  They also have an 'interpreter' option, where the AIR runtime is precompiled, and then the swf bytecode is inserted untouched to be ran back by the AIR runtime on the device, and all the packager does is sign it.  This is faster and works fine but is not submittable to the app store because it uses interpreted code.

If we could do something similar with haXe, I'd only be concerned about the testing part of the cycle anyway- ie, NME and its libs are static and precompiled, then could we have the NME user's haxe code built and packaged with the rest, and signed, from a pc - that would produce an IPA that could also be installed from a PC? (using IPCU or iTunes?)

Alex


Kevin Newman

unread,
Mar 14, 2012, 4:50:57 PM3/14/12
to haxe...@googlegroups.com
I thought Apple relaxed those restrictions - JIT is still not allowed
(you'd need to use "private APIs" to implement one - Adobe doesn't offer
a JIT version for that reason) - but I thought strict interpreters are
actually allowed now (they just can't load remote code - it has to be
loaded locally, from packaged assets).

Along those lines - a runtime shim, that you could build and install
once, then send an app payload to over wifi would be epic - even if it
uses private APIs (to implement a JIT - assuming the APIs haven't been
locked down some other way) since you wouldn't be submitting that test
shim to Apple anyway. Something like that could help with rapid
iteration on that platform.

Kevin N.

Alex Liebert

unread,
Mar 14, 2012, 6:22:32 PM3/14/12
to haxe...@googlegroups.com
Not sure exactly where apple's landed on the restrictions, but I know what I Described is how AIR works for now.

The ideal solution would allow Windows (or linux?) NME tools to take your official apple dev mobileprovision file, keyfile, and haxe source, and produce an IPA that can be installed on a non-jail broken iOS device, by a developer, using Iphone configuration Utility or iTunes.

A few other products do this successfully (the Unreal Engine SDK for example.)  In these cases, they have their own codesign tool for windows that signs the IPA.

The idea of using the Android NDK, or CodeSourcey SDK to produce the custom haxe code part of the ipa sounds promising.

On the codesigning front, its a matter of taking a template IPA file and inserting the new resources and libraries.  IPAs are codesigned by:

-having a embedded.mobileprovision file inside the IPA (which is just a zip).  This is a copy of the developers provided mobile provision
-having a CodeResources file in the root of the payload in the zip, this is a symlink to CodeResources file in /Payload/appname.app/_CodeSignature/CodeResources
-the file mentioned above is xml, the apple 'plist' format.  inside it is a list of resources with a hash for each one, that is somehow generated by hasing the resource with the certificate.

This article explains the format in detail.  It appears it is possible to omit certain resources from the signed stuff, which may be an important step:


This article explains the ipa format and signing in depth.  It explains creating new IPAs and signing them without xcode.  It does however rely on the mac codesign tool:


If we can dig up how the signing process actually works it could be done on windows for haxe/nme using openssl from what I can tell.

Ideally I'd want to be able to build my 'testing' IPAs on windows during development, with my real valid apple certificates and unbroken iphone, then be fine to log back into os x when i'm ready to submit to the app store and do an official build from there.

Alex


Alex Liebert

unread,
Mar 14, 2012, 7:33:55 PM3/14/12
to haxe...@googlegroups.com
one last tidbit that may be useful to someone who understands how the compilation works:

The Adobe tools that build iphone binaries for windows are based on Apple's opensource gcc tools etc.  The changes Adobe made to them to work on windows are therefore also open source.  If you download the AIR SDK and navigate to lib/aot, inside you'll find the binaries, stubs for iOS specific frameworks, and readme files that contain links to Adobe's hosted diffs that will make the tools compile for windows.

Kevin Newman

unread,
Mar 15, 2012, 10:30:54 AM3/15/12
to haxe...@googlegroups.com
I wonder how complete those diffs are. Could you theoretically use them
to compile SWFs into ARM, but use NME in place of the proprietary Flash
components, then mix in your custom HaXe -> C++ work? That'd be pretty
epic. :-)

Kevin N.

Joshua Granick

unread,
Mar 16, 2012, 3:18:19 AM3/16/12
to haxe...@googlegroups.com
We might have the breadcrumbs of a way to have an iOS compatible G++
toolchain for Windows... create a clean native compile for iOS from
Windows or possibly Linux.

Of course, if we really got it right, Apple would probably take a left
turn to shut it down...


On Thu, 15 Mar 2012 07:30:54 -0700, Kevin Newman <Capt...@unfocus.com>
wrote:

Philippe Elsass

unread,
Mar 16, 2012, 4:14:53 AM3/16/12
to haxe...@googlegroups.com
AFAIK Apple doesn't forbid the creation of IPAs on other systems - it's just not supported. Here's for Linux:
http://www.saurik.com/id/4

It doesn't seem to be a problem if you submit a clean final IPA from OSX.




--
Philippe

Alex Liebert

unread,
Mar 16, 2012, 2:05:04 PM3/16/12
to haxe...@googlegroups.com
I agree with Phillipe there.  Big name brands like UDK allow compilation from windows.  Apple's relaxed on most of that stuff, just need to run the final upload tool from a mac.  (and either way- if i do my 2-20 daily development builds on windows, then switch to xcode to do the release build for submission, im perfectly happy with that :) )

Alex Liebert

unread,
Mar 16, 2012, 2:05:42 PM3/16/12
to haxe...@googlegroups.com
unrelated thread hijacking, there are now *2* games made with haXe that have been featured front page, on device, by Apple!

Kevin Newman

unread,
Mar 16, 2012, 2:07:04 PM3/16/12
to haxe...@googlegroups.com
Well, which are they?!

:-)

Kevin N.

tom rhodes

unread,
Mar 16, 2012, 2:10:39 PM3/16/12
to haxe...@googlegroups.com
ponon was deffo one of them, dunno number 2?

Alex Liebert

unread,
Mar 16, 2012, 2:16:34 PM3/16/12
to haxe...@googlegroups.com
make that 3 then.

Yesterday: Rune Raiders
last month: Bouncy Seed

i didn't know ponon got featured, awesome, that makes 3...

Philippe Elsass

unread,
Mar 16, 2012, 4:42:29 PM3/16/12
to haxe...@googlegroups.com
Oh congrats for Rune Raiders feature :)
Philippe

Joshua Granick

unread,
Mar 16, 2012, 5:17:46 PM3/16/12
to haxe...@googlegroups.com
I updated the Showcase for NME last night, those are near the top:

http://www.haxenme.org/showcase

On Fri, 16 Mar 2012 13:42:29 -0700, Philippe Elsass
<philipp...@gmail.com> wrote:

> Oh congrats for Rune Raiders feature :)
>
> On Fri, Mar 16, 2012 at 7:16 PM, Alex Liebert
> <alie...@milkmangames.com>wrote:
>
>> make that 3 then.
>>
>> Yesterday: Rune Raiders
>> last month: Bouncy Seed
>>
>> i didn't know ponon got featured, awesome, that makes 3...
>>
>>
>> On Fri, Mar 16, 2012 at 11:10 AM, tom rhodes <tom.r...@gmail.com>
>> wrote:
>>
>>> ponon was deffo one of them, dunno number 2?
>>>
>>>
>>> On 16 March 2012 19:07, Kevin Newman <Capt...@unfocus.com> wrote:
>>>
>>>> Well, which are they?!
>>>>
>>>> :-)
>>>>
>>>> Kevin N.
>>>>
>>>>
>>>>
>>>> On 3/16/12 2:05 PM, Alex Liebert wrote:
>>>>
>>>>> unrelated thread hijacking, there are now *2* games made with haXe
>>>>> that
>>>>> have been featured front page, on device, by Apple!
>>>>>
>>>>
>>>> --
>>>> To post to this group haxe...@googlegroups.com

>>>> http://groups.google.com/**group/haxelang?hl=en<http://groups.google.com/group/haxelang?hl=en>

Alex Liebert

unread,
Mar 18, 2012, 3:36:43 PM3/18/12
to haxe...@googlegroups.com
Ok, more research, the hashes in the coderesources file are just SHA1 hashes with no salt.  So that's easy to generate.  It's not clear if a signature goes anywhere else though.  It's possible that just having that correct + a developer provision embedded does the trick.

Anyone have any insights on using codesourcery to build the binary though?

Joshua Granick

unread,
Mar 19, 2012, 1:31:55 PM3/19/12
to haxe...@googlegroups.com
If I was to approach this problem, I would attempt to tackle it backwards.


- See if you can install your own IPA from Windows
- See if you can take a compiled .app and bundle it into a valid IPA,
from Windows and from Mac
- See what happens when you use a modified version of
iphoneos-toolchain.xml in HXCPP, with other compilers. Missing headers?


Being able to install a pre-compiled app is the first problem. The second
is being able to bundle an .app into an .ipa. Today, NME is able to
compile release .app for iOS, without opening XCode. Being able to push
this into a valid .ipa and install on the device would be a huge step
forward, IMO, as that eliminates the manual XCode step for device builds.
That would also make it easier to build on a remote Mac machine then push
it to a local device on Windows.

Once that's working, you could experiment with using a different compiler,
and seeing what comes up missing. What do we need to do to get it to
compile? Then its a matter of seeing whether it runs, but the first step
is just to get it to build.

Philippe Elsass

unread,
Mar 19, 2012, 4:31:39 PM3/19/12
to haxe...@googlegroups.com
I wish the trick used by iFunBox to install IPAs was documented - this tool on Windows perfectly installs IPAs like xcode organizer does.
Philippe

Hugh

unread,
Mar 20, 2012, 11:00:51 AM3/20/12
to haXe
Hi,
Getting my head around the exact details of the code signing is what
has prevented me from taking this any further.
Even the crypto file formats can get a little heavy.
So if someone can get a step by step guide, then integrating to the
nme tool should not be too hard.
Hugh

On Mar 20, 4:31 am, Philippe Elsass <philippe.els...@gmail.com> wrote:
> I wish the trick used by iFunBox to install IPAs was documented - this tool
> on Windows perfectly installs IPAs like xcode organizer does.
>
> On Mon, Mar 19, 2012 at 6:31 PM, Joshua Granick
> <bulkm...@joshuagranick.com>wrote:
>
>
>
>
>
>
>
>
>
> > If I was to approach this problem, I would attempt to tackle it backwards.
>
> >  - See if you can install your own IPA from Windows
> >  - See if you can take a compiled .app and bundle it into a valid IPA,
> > from Windows and from Mac
> >  - See what happens when you use a modified version of
> > iphoneos-toolchain.xml in HXCPP, with other compilers. Missing headers?
>
> > Being able to install a pre-compiled app is the first problem. The second
> > is being able to bundle an .app into an .ipa. Today, NME is able to compile
> > release .app for iOS, without opening XCode. Being able to push this into a
> > valid .ipa and install on the device would be a huge step forward, IMO, as
> > that eliminates the manual XCode step for device builds. That would also
> > make it easier to build on a remote Mac machine then push it to a local
> > device on Windows.
>
> > Once that's working, you could experiment with using a different compiler,
> > and seeing what comes up missing. What do we need to do to get it to
> > compile? Then its a matter of seeing whether it runs, but the first step is
> > just to get it to build.
>
> > On Sun, 18 Mar 2012 12:36:43 -0700, Alex Liebert <
> > alieb...@milkmangames.com> wrote:
>
> >  Ok, more research, the hashes in the coderesources file are just SHA1
> >> hashes with no salt.  So that's easy to generate.  It's not clear if a
> >> signature goes anywhere else though.  It's >possible that just having that
> >> correct + a developer provision embedded does the trick.
>
> >> Anyone have any insights on using codesourcery to build the binary though?
>
> >> On Wed, Mar 14, 2012 at 3:22 PM, Alex Liebert <alieb...@milkmangames.com>
> >> wrote:
>
> >>  Not sure exactly where apple's landed on the restrictions, but I know
> >>> what I Described is how AIR works for now.
>
> >>> The ideal solution would allow Windows (or linux?) NME tools to take
> >>> your official apple dev mobileprovision file, keyfile, and haxe source, and
> >>> produce an IPA that can be installed >>on a non-jail broken iOS device, by
> >>> a developer, using Iphone configuration Utility or iTunes.
>
> >>> A few other products do this successfully (the Unreal Engine SDK for
> >>> example.)  In these cases, they have their own codesign tool for windows
> >>> that signs the IPA.
>
> >>> The idea of using the Android NDK, or CodeSourcey SDK to produce the
> >>> custom haxe code part of the ipa sounds promising.
>
> >>> On the codesigning front, its a matter of taking a template IPA file and
> >>> inserting the new resources and libraries.  IPAs are codesigned by:
>
> >>> -having a embedded.mobileprovision file inside the IPA (which is just a
> >>> zip).  This is a copy of the developers provided mobile provision
>
> >>> -having a CodeResources file in the root of the payload in the zip, this
> >>> is a symlink to CodeResources file in /Payload/appname.app/_**
> >>> CodeSignature/CodeResources
> >>> -the file mentioned above is xml, the apple 'plist' format.  inside it
> >>> is a list of resources with a hash for each one, that is somehow generated
> >>> by hasing the resource with the >>certificate.
>
> >>> This article explains the format in detail.  It appears it is possible
> >>> to omit certain resources from the signed stuff, which may be an important
> >>> step:
>
> >>>https://developer.apple.com/**library/mac/#technotes/tn2206/**
> >>> _index.html<https://developer.apple.com/library/mac/#technotes/tn2206/_index.html>
>
> >>> This article explains the ipa format and signing in depth.  It explains
> >>> creating new IPAs and signing them without xcode.  It does however rely on
> >>> the mac codesign tool:
>
> >>>http://floatlearning.com/2011/**11/re-signing-an-ios-app-**
> >>> without-xcode/<http://floatlearning.com/2011/11/re-signing-an-ios-app-without-xcode/>
>
> >>> If we can dig up how the signing process actually works it could be done
> >>> on windows for haxe/nme using openssl from what I can tell.
>
> >>> Ideally I'd want to be able to build my 'testing' IPAs on windows during
> >>> development, with my real valid apple certificates and unbroken iphone,
> >>> then be fine to log back into os x >>when i'm ready to submit to the app
> >>> store and do an official build from there.
>
> >>> Alex
>
> >>> On Wed, Mar 14, 2012 at 1:50 PM, Kevin Newman <Capta...@unfocus.com>
> >>> wrote:
>
> >>>> I thought Apple relaxed those restrictions - JIT is still not allowed
> >>>> (you'd need to use "private APIs" to implement one - Adobe doesn't offer a
> >>>> JIT version for that reason) - but >>>I thought strict interpreters are
> >>>> actually allowed now (they just can't load remote code - it has to be
> >>>> loaded locally, from packaged assets).
>
> >>>> Along those lines - a runtime shim, that you could build and install
> >>>> once, then send an app payload to over wifi would be epic - even if it uses
> >>>> private APIs (to implement a JIT - >>>assuming the APIs haven't been locked
> >>>> down some other way) since you wouldn't be submitting that test shim to
> >>>> Apple anyway. Something like that could help with rapid iteration on
> >>>> >>>that platform.
>
> >>>> Kevin N.
>
> >>>> On 3/14/12 4:32 PM, Alex Liebert wrote:
>
> >>>>> This is faster and works fine but is not submittable to the app store
> >>>>> because it uses interpreted code.
>
> >>>> --
> >>>> To post to this group haxe...@googlegroups.com
>
> >>>>http://groups.google.com/**group/haxelang?hl=en<http://groups.google.com/group/haxelang?hl=en>
>
> >> --
> >> To post to this group haxe...@googlegroups.com
>
> >>http://groups.google.com/**group/haxelang?hl=en<http://groups.google.com/group/haxelang?hl=en>
>
> > --
> > To post to this group haxe...@googlegroups.com
> >http://groups.google.com/**group/haxelang?hl=en<http://groups.google.com/group/haxelang?hl=en>
>
> --
> Philippe

Alex Liebert

unread,
Mar 20, 2012, 2:01:35 PM3/20/12
to haxe...@googlegroups.com
i believe i am getting close to this.  i'll share info on this thread as soon as i can make something basic work.


Tarwin Stroh-Spijer

unread,
Mar 20, 2012, 2:05:15 PM3/20/12
to haxe...@googlegroups.com
You guy's are - well - geniuses!


Tarwin Stroh-Spijer
_______________________

Touch My Pixel
http://www.touchmypixel.com/
cell: +1 650 842 0920
_______________________

Alex Liebert

unread,
Mar 20, 2012, 5:05:13 PM3/20/12
to haxe...@googlegroups.com
Hey Hugh,

I thought it would be as simple as generating the new hashes and rezipping as long as the embedded provision was valid, but that seems to break it.  I don't know the format of the PkgInfo file and I think there's some other stuff going in there.

However, I did find the complete source code to the codesign tool :)  So perhaps that will help?

Joshua Granick

unread,
Mar 20, 2012, 5:09:06 PM3/20/12
to haxe...@googlegroups.com
Alex,

Have you been able to use codesign on OS X?

I think it would be great to be able to generate valid IPA files from OS
X. Getting that working (and into the command-line tools) would make it
that much easier to look at reproducing the same on Windows

Alex Liebert

unread,
Mar 20, 2012, 5:30:37 PM3/20/12
to haxe...@googlegroups.com


basically:

-create a resourcerules list that omits all resources from checking
-take an existing ipa file (in our case, this would be a 'template' ipa we included with NME.  
-build the new .app file and replace the old one in the template with it.  update plist etc as appropriate
-use codesign cli tool to resign a copy of the modified new template
-rezip and enjoy


iResign is an oss tool that does the majority of this already, source here:


For quick ref - a shell script with similar intent,  Copy and pasted obviously from a different article:

#!/bin/sh

TEMPDIR
=/tmp/$RANDOM-$RANDOM-$RANDOM
RESOURCERULES
=/tmp/ResourceRules-$RANDOM$RANDOM.plist
CURRENTDIR
=`pwd`

mkdir
-p "$TEMPDIR"

cat
- > "$RESOURCERULES" <<ResourceRulesPlistDelimiter
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   
<key>rules</key>
    <dict>
        <key>.*</
key>
       
<true/>
       
<key>Info.plist</key>
        <dict>
            <key>omit</
key>
           
<true/>
           
<key>weight</key>
            <real>10</
real>
       
</dict>
        <key>ResourceRules.plist</
key>
       
<dict>
           
<key>omit</key>
            <true/
>
           
<key>weight</key>
            <real>100</
real>
       
</dict>
    </
dict>
</dict>
</
plist>
ResourceRulesPlistDelimiter

unzip
-q "$1" -d "$TEMPDIR" || exit 1
xattr
-d -r com.apple.quarantine "$TEMPDIR"

for APPBUNDLE in "`find "$TEMPDIR" -name "*.app"`"; do
    codesign
--resource-rules="$RESOURCERULES" -f -s "iPhone Developer" "$APPBUNDLE"
    codesign
-dvvvv -r- "$APPBUNDLE"
done

cd
"$TEMPDIR"
zip
-qr "$TEMPDIR.zip" "Payload" && cd "$CURRENTDIR" && mv "$1" "$1.bak" && mv "$TEMPDIR.zip" "$1"
cd
"$CURRENTDIR"
rm
-rf "$TEMPDIR.zip"
rm
-rf "$TEMPDIR"
rm
-rf "$RESOURCERULES"
Reply all
Reply to author
Forward
0 new messages