DroidKaigi / conference-app-2019

The Official Conference App for DroidKaigi 2019 Tokyo
https://droidkaigi.jp/2019/en/
Apache License 2.0
815 stars 267 forks source link

Use the production API endpoint for iOS app as well #674

Closed jmatsu closed 5 years ago

jmatsu commented 5 years ago

Kind (Required)

hironytic commented 5 years ago

I'll give it a try 🙋‍♂️

hironytic commented 5 years ago

I've started working on this issue, but I have a question. How can I build the iOS app for release? I simply changed the build configuration to "Release" and run, then I got a linker error. I think the reason is related this linker warning:

ld: warning: ignoring file /Users/ichi/Projects/private/DroidKaigi2019/conference-app-2019/frontend/ioscombined/build/xcode-frameworks/ioscombined.framework/ioscombined, file was built for x86_64 which is not the architecture being linked (i386): 

Can anyone tell me how? 🙏

panpanini commented 5 years ago

thanks, I'll assign you!

What was the command you were using to build the release app?

hironytic commented 5 years ago

@panpanini Thanks for your support. I did the following steps in Xcode:

  1. Select the menu Product > Scheme > Edit Scheme
  2. In the opened dialog, select "Run" on the left pane, change Build Configuration to "Release" in Info tab on the right pane.
  3. Close the dialog.
  4. Set destination to "iPhone XS" (simulator) via Product > Destination menu.
  5. Run (Product > Run)
takahirom commented 5 years ago

I did the following step for release.

  1. Select Generic iOS devices image
  2. Product archive

And I did your steps. It became same error 😭

panpanini commented 5 years ago

Can you try checking the Build Active Architecture Only setting? It should be set to No

panpanini commented 5 years ago

(The problem is that for the simulator, we need an i836 library, but only an x86_64 was built)

takahirom commented 5 years ago

I don't know for that setting. But it relates here. https://github.com/DroidKaigi/conference-app-2019/blob/master/frontend/ioscombined/build.gradle#L7

hironytic commented 5 years ago

The setting is below:

screen shot 2019-01-30 at 11 12 57

Anyway, I also did @takahirom way, archive targeting Generic iOS Device, but I got same error.

ld: warning: ignoring file /Users/ichi/Projects/private/DroidKaigi2019/conference-app-2019/frontend/ioscombined/build/xcode-frameworks/ioscombined.framework/ioscombined, file was built for x86_64 which is not the architecture being linked (arm64): /Users/ichi/Projects/private/DroidKaigi2019/conference-app-2019/frontend/ioscombined/build/xcode-frameworks/ioscombined.framework/ioscombined

file was built for x86_64 which is not the architecture being linked (arm64)

I have no idea why it is built for x86_64. I think it is for simulator.

takahirom commented 5 years ago

Sorry, when I release it. I also did the following steps. 🙇

  1. Clean build folder

  2. I set it

iosX64('iOS')

iosArm64('iOS')
  1. Set team.

  2. Archive

hironytic commented 5 years ago

Ah, thanks. After changing iosX64('iOS') to iosArm64('iOS') in ioscombined/build.gradle (and also changing bundle ID to my own and setting team), I finally succeeded to archive 🎉