Is there a way to create a iOS without the Xcode IDE, and instead using Terminal and a Text Editor (like Atom)?
With Linux, i can accomplish this to build an Android app using Maven to create the minimum directory structure, compile the files after add them (in the Atom editor), create the APK and upload the package to the device.
Is there any command-line utility to accomplish some of this tasks in MacOSX?
You can use the xcodebuild command line tool to build, but there is no apple-provided tool to generate the project files other than Xcode. Google does have a tool called gyp which can generate the project files, though I'm not certain your use case is what it was designed for.
Other than that you pretty much have to hold your nose and use Xcode to setup your project, add files, change build settings, etc, and use whatever editor you want to actually edit the code.
Related
Currently I am working on one KMM project. It would be really useful to be able to debug the shared code which is in kotlin in xcode project.
I am aware of this solution but I have problem to tell Xcode that *.kt files are source files
to be more specific in the above github link it is written :
You need to tell Xcode that *.kt files are source files, and run an lldb formatter script when debugging starts. Advanced users may want to do this manually, but if you have Xcode installed in the default place, you can run the setup script.
Unless you're using Xcode 11 (in which case look here for help), the following script will install both debugging and formatting support:
./setup.sh
I do not know where and how I should run the ./setup.sh or if there is another way to do it?
The setup script is included in the github repository: https://github.com/touchlab/xcode-kotlin/blob/main/setup.sh
The above plugin is great if you want to debug on Xcode and I highly recommend it.
Just an FYI, in case you didn't notice, there is also a plugin for debugging shared code on iOS for Android Studio: https://plugins.jetbrains.com/plugin/14936-kotlin-multiplatform-mobile
I am not used to work with kony platform and I have created simple app but I want to export it and run it as native iOS .xcocdeproj.
Kony Visualizer gives you different ways of building and viewing your app, depending on your needs. In Kony Visualizer Enterprise, you can build your app either from the Product menu, or from a command line. And you can view your built app either by previewing it on a mobile device, or by using device emulators and simulators that you configure. Please refer to this docs link to build for iOS using Kony Visualizer.
Please do this below steps.
once Kar file was build. go to your visualizer installation folder and go to plugins and then you can find com.kony.ios_8.2.28.v201811051627.jar file if you are using 8.2.28 version just for example.
Copy above file and rename it as zip file and unzip it.
once unzip was done inside you can find another zip file please unzip. ( ex: 8.2.28.zip)
you can see folder called VMAppWithKonylib.
now go open command-line tool and go to VMAppWithKonylib location.
now go to gen folder location inside your commandline. gen folder will inside VMAppWithKonylib.
7.now run this command - perl extract.pl konyappiphone.KAR
once extract done now go to VMAppWithKonylib and open project in xcode.
let me know if you are facing any more issues.
I have an foo.xcconfig file that will have different values depending where in the world a developer is. Currently, we use a phase to create this file (which is imported by other config files). In the new build system, Xcode is now resolving the dependencies before I have a chance to create a dummy to satisfy the include.
This is easily solved for CI builds by doing the work before calling xcodebuild, but for local builds using the GUI, there does not seem to be a good solution.
To get Carthage set up, the documentation says that you need to add a Run Script.
On your application targets’ “Build Phases” settings tab, click the
“+” icon and choose “New Run Script Phase”. Create a Run Script in
which you specify your shell (ex: bin/sh), add the following contents
to the script area below the shell:
/usr/local/bin/carthage copy-frameworks
and add the paths to the frameworks you want to use under “Input
Files”, e.g.:
$(SRCROOT)/Carthage/Build/iOS/Box.framework
$(SRCROOT)/Carthage/Build/iOS/Result.framework
$(SRCROOT)/Carthage/Build/iOS/ReactiveCocoa.framework
This script works around an App Store submission bug triggered by
universal binaries and ensures that necessary bitcode-related files
and dSYMs are copied when archiving.
However, I can't find the Build Phases tab anymore or Run Script in the Build Settings search. The Xcode 8 Release Notes mention
Xcode 8 provides completely rewritten AppleScript support. A new
scripting dictionary provides the ability to automate Xcode workflows.
Does that mean there is no more Run Script? I looked at AppleScript but honestly it looks overwhelmingly complex. Do I need to learn AppleScript just to add the simple one liner that I used to do in Xcode?
/usr/local/bin/carthage copy-frameworks
It is still there. Make sure you click everywhere indicated in red in the image below.
Carthage maintainers updated README, it is necessary to add output paths too to prevent useful copying of frameworks. I have released simple script named Carting to automate these steps.
In xcode 3, using a bash script, I could run xcode from the command line, then take the files in the build directory and zip them up into a .ipa file, allowing for a fully automated build process for my adhoc iOS distribution. Anytime there is human intervention, there is the possibly for error.
Under xcode 4, this seem to be not possible anymore. The build directory has been replaced with a DerivedBuilds folder and it uses some obfuscation naming, so it's not possible to let an external script find the files.
In xcode 4, after the build, I need to run Produce->Archive, then selected the file in the organizer, then select save, then navigate to the final folder and name the file and hit save. This is a very error prone process better left to machines.
So, is there a way to go from a clean build all the way to a signed .ipa file? I've got to believe this is possible, there is no way people with automated build processes are having to do this step by hand.
Does anyone know how to do this?
Sure, the script I have been using in my continuous integration environment is available at https://gist.github.com/949831 That might do more than you need but should be able to serve as a base for whatever steps you want to include in your build process.
As you noted it would be hard to predict the derived data path Xcode will use but it is not too hard to located it in the build output as part of the build script.