Hi! I'm trying out Amper (with gradle) in one of m...
# amper
d
Hi! I'm trying out Amper (with gradle) in one of my Compose Multiplatform hobby projects. I really much like the simplicity you are going for, perfect to get up and running fast 🫶 Question! Deploying to ios simulator works fine. I try to deploy my ios app on an iPhone device (because I want to use the camera in my app). I'm getting the following error:
Copy code
error: No profiles for 'MyApp.iosApp.iosApp' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'MyApp.iosApp.iosApp'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'iosApp' from project 'iosApp')
I started a new project in XCode and made sure that signing and deploying to device works there, so now the question is; How do I configure provisioning profiles with Amper? Or should I make my
iosApp
module into a project that can be opened in XCode and set it up from there? I'm not an ios developer, so I'm sorry if this is a very basic question (but hopefully it can help other beginners in the future 🥲)
My current `iosApp/module.yaml`:
Copy code
product: ios/app

dependencies:
  - ../shared

settings:
  compose: enabled
  ios:
    teamId: "myteam"
    framework:
        basename: "myapp"
a
Hi! currently, you can disable signing during the build adding this to your `build.gradle.kts`:
Copy code
apple {
    targets.named("iosApp") {
        buildSettings.apply {
            CODE_SIGN_IDENTITY("")
            custom("CODE_SIGNING_REQUIRED", "NO")
        }
    }
}
And then sign built application manually before deploying, that will be located in
build/bin/<module-name>/
Or you can add your signing details using snippet above
Unfortunately, now there is no easy way to handle signing ios apps for real devices, but we are looking how to support that
d
Cool, thanks, I will try that! 🙏 Looking forward to updates on this!
When you say that you are looking into how to support signing, do you mean "you" as in "Team Amper"? Would you mind elaborating what you are imagining, and how it could be achieved? And is it possible to achieve today with the apple gradle plugin? I talked to an ios developer I know and asked if he could help me, and we created a project in xcode with the same bundle id and installed a certificate on his device, and tried to set the same values for that dummy project in my hobby project to try to trick the device to accept my app, but it didnt work. Here are the values we set (that we found in that other xcode proejct):
Copy code
this.buildSettings.apply {
    PRODUCT_BUNDLE_IDENTIFIER("no.agens.myapp")
    CODE_SIGN_IDENTITY("Apple Development")
    PROVISIONING_PROFILE_SPECIFIER("XC no agens myapp")
}
and the error:
Copy code
error: No profile for team 'Christopher Dambakk (Personal Team)' matching 'XC no agens myapp' found: Xcode couldn't find any provisioning profiles matching 'Christopher Dambakk (Personal Team)/XC no agens myapp'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the Signing & Capabilities tab of the target editor. (in target 'iosApp' from project 'iosApp')
Do you have any suggestions on what to try next? Do you know of an example code base with Amper that managed to install a signed build on a real device?
a
The issue should be fixed here. https://jetbrains.slack.com/archives/C062WG3A7T8/p1717680062447299 If it doesn't work, try to change
PRODUCT_BUNDLE_IDENTIFIER
d
Cool! 🎉 Thanks, I will check it out!
I'm trying out the new version, and I'm still not able to deploy to ios device.. What should the value of
PRODUCT_BUNDLE_IDENTIFIER
be? Same as the root package name, or something else?
a
Hi! You don't need to specify anything in build kts now. But you need to specify your personal team id in module.yaml file
a
What should the value of
PRODUCT_BUNDLE_IDENTIFIER
be? Same as the root package name, or something else?
Try just different than you had before (
MyApp.iosApp.iosApp
), like any arbitrary value