programmatically xcode build(ios library) -is it possible? - xcode

I have mac descktop app(flutter, small obfuscator for objective-c code). after obfuscation of the source code, the user builds a ios library in XCode. is it possible to start the build process from my application?
These my options are:
Xcode Command Line Tools - it's very similar, but looks a bit complicated.
Also, I don't know yet how to use the terminal (terminal commands) in the desktop application - is it even possible?
fastlane -this tool is more for deployment. can i use this to build locally?
What do you recommend? maybe there are other options?

read below documentaion and set flutter path so it can be runable in terminal or you can get help from youtube to set flutter path
then simply open terminal and run below comands one by one
1.open -a simulator
this command open ios emulator
write cd and drag your project folder path
cd .../example
flutter run
✅your app launch in emulator
flutter path set details
https://docs.flutter.dev/get-started/install/macos

Related

XCode - How to reset/"delete" a mac os app run from Xcode (analog to deleting the app in the ios simulator)?

When using the iOS Simulator, I can simply delete the app and re-run the app to start fresh. How is this done for mac os apps? I can't find it out. There is a folder for the project inside "DerivedData", but deleting this also messes with the entire project and I have to re-fetch all dependencies and stuff.
Thanks!
Had the same question, found the answer in another question on Stack Overflow: Nicolas Miari and superfell's answer did the trick for me and my Mac Catalyst app:
You can use the defaults command line tool to remove all the settings,
you just need the bundle id of your app (which you can find in your
Info.plist file), e.g. if your bundle id is "com.foo.barApp" then you
can run this from a terminal shell:
defaults delete com.foo.barApp
For anyone who comes here later for solution:
install fd from homebrew: brew install fd
search for your data folder: fd com.thisIsYour.bundleId
You should see something likes this:
Library/Containers/B155E847-3026-484D-8CC1-165E3CA1E9CD/Data/Library/...
Library/Containers/B155E847-3026-484D-8CC1-165E3CA1E9CD/Data/Library/...
Library/Containers/B155E847-3026-484D-8CC1-165E3CA1E9CD/Data/Library/...
remove the folder: rm -rf Library/Containers/B155E847-3026-484D-8CC1-165E3CA1E9CD
If the app is storing something at say ~/Library/Caches/yourapp or ~/Library/Application Support/yourapp, it's trivial to set up an Automator Service, or bash alias to clean them up.
~/Library/Developer/Xcode/DerivedData is meant for the Xcode project and the things Xcode creates, not the things that your app creates such as user preferences.
Alternatively, you can create a listener for a flag in the app itself like --run-fresh that can be set in scheme settings as launch argument. This flag will (if you code it) stop the app from looking into user data folder.

Where is google Chromium's Xcode Project?

I'm trying to make a web browser application for macOS. So I went to build chromium for macOS. I did all the instructions but I never got an Xcode project. Can you please help me with this.
I was following the instructions for macOS
You have to use GN to build XCode project. Suppose YourBuildFolder is the folder in which you are compiling Chromium, then execute the following command:
gn gen out/YourBuildFolder --ide=xcode
Now if you navigate to YourBuildFolder you should see this file: all.xcodeproj
As this project is too big, it will slow down XCode. So this isn't the recommended way to write Chromium code in macOS.

Grunt, Cordova & Windows Phone

I am developing an app for multiple platforms using Cordova. Grunt is used as a build tool. I use it to copy my source code to the right folder for each platform so I can develop them independently.
This works fine with Android using the scripts that are provided by Cordova. However, I have no idea if or how it is possible to automate the WP build process. I'm looking for two things:
Add all files in the www directory to the VS project (it does not include files that are not added to the project, which is sad).
Build, install and run the app in the emulator. I used adb & Grunt's exec for Android which was really simple, is there something similar for WP?
If you look in a cordova windows phone project there is a directory called 'cordova' which contains scripts to do all of this.
There should be scripts to build and run your project.
The run script can pretty much do it all. You can call it like :
run --device --release
or
run --emulator --debug
or just
run
A recent commit now makes it possible to use www\** in the .csproj file, which solved my first issue.

OSX Package not running executable

I am new to development on OSX and am having an issue that is confusing me.
I am using xcode for work and I everything works when I debug from xcodes debugger.
However, when I am running the package manually, it doesn't seem to run the executable in the packages MacOS.
Basically, in xcode, is there something I need to set so that it knows where and how to run the executable in the MacOS directory?
I already changed the plist to have the executable set to the correct name. I am stuck as to even where to start looking for the issue.
Thanks in advance for any help you can give, developing for the mac has been a crash course for me :P
-Bear
Archive the project (Product->Archive) and then open the Organizer (Window->Organizer), select the archived version and click on "Distribute" and select "Export as Application".

Terminal Command or Apple Script to run XCode?

Is is possible to make XCode run by executing an AppleScript or some sort of terminal command?
Can you pass XCode startup arguments, like a project to open, or to build a project on startup?
Edit:
Please excuse my laziness, but Apple Script samples are appreciated.
It's fairly simple to run Xcode from the Terminal: open -a Xcode to simply open it, or open yourproject.xcodeproj to open your project in Xcode. As for getting it to build on startup, you'd probably have to turn to AppleScript for that:
tell application "Xcode"
build
launch
end tell

Resources