shinydevelopment / simulatorstatusmagic Goto Github PK
View Code? Open in Web Editor NEWClean up your status bar for taking screenshots on the iOS simulator.
License: MIT License
Clean up your status bar for taking screenshots on the iOS simulator.
License: MIT License
Or link to option(s) in readme? I'm not finding anything! 😊
Not working properly in iOS 16 yet. dsdump
seems to be crashing when running against the binaries in Xcode 14 beta 1, so need to get that fixed first.
Thank you for this excellent project that I've been using for years.
Just wanted to let you know that I got a rejection from Apple (“Specifically, your 9.7-inch iPad screenshots display older IOS version in the status bar.”) with the version I cloned from the master branch yesterday.
(I’m not sure why the feedback specifically mentions 9.7" when I uploaded 12.9" screenshots.)
When attempting to upload my app to ITC, I received an email informing me:
Non-public API usage:
The app contains or inherits from non-public classes in Frameworks/SimulatorStatusMagiciOS.framework/SimulatorStatusMagiciOS: UIStatusBarServer
I've imported the SimulatorStatusMagic project, added SimulatorStatusMagiciOS.framework
as an embedded binary. To ensure I don't include the framework in the submission, I only import the framework on the debug config, but I think I'm missing something...
Got header from RuntimeBrowser, and struct are a little different for iOS 9.3 :
+ (struct { bool x1[29]; unsigned int x2 : 1; unsigned int x3 : 1; unsigned int x4 : 1; unsigned int x5 : 1; unsigned int x6 : 2; unsigned int x7 : 1; unsigned int x8 : 1; unsigned int x9 : 1; unsigned int x10 : 1; unsigned int x11 : 1; unsigned int x12 : 1; unsigned int x13 : 1; unsigned int x14 : 1; unsigned int x15 : 1; unsigned int x16 : 1; unsigned int x17 : 1; unsigned int x18 : 1; unsigned int x19 : 1; unsigned int x20 : 1; unsigned int x21 : 1; unsigned int x22 : 1; unsigned int x23 : 1; unsigned int x24 : 1; struct { bool x_25_1_1[29]; BOOL x_25_1_2[64]; int x_25_1_3; int x_25_1_4; BOOL x_25_1_5[100]; BOOL x_25_1_6[100]; BOOL x_25_1_7[2][100]; BOOL x_25_1_8[1024]; unsigned int x_25_1_9; int x_25_1_10; int x_25_1_11; unsigned int x_25_1_12; int x_25_1_13; unsigned int x_25_1_14; BOOL x_25_1_15[150]; int x_25_1_16; int x_25_1_17; unsigned int x_25_1_18 : 1; unsigned int x_25_1_19 : 1; unsigned int x_25_1_20 : 1; BOOL x_25_1_21[256]; unsigned int x_25_1_22 : 1; unsigned int x_25_1_23 : 1; unsigned int x_25_1_24 : 1; unsigned int x_25_1_25 : 1; unsigned int x_25_1_26 : 1; unsigned int x_25_1_27; unsigned int x_25_1_28 : 1; unsigned int x_25_1_29 : 1; BOOL x_25_1_30[256]; BOOL x_25_1_31[256]; BOOL x_25_1_32[100]; } x25; }*)getStatusBarOverrideData;
unreadable... there are 29 boolean instead of 27 for current iOS9 overrider :
typedef struct { bool x_25_1_1[29];
char timeString[64];//x_25_1_2[64];
int x_25_1_3;
int x_25_1_4;
char serviceString[100];
char serviceCrossfadeString[100];
char x_25_1_7[2][100];
char x_25_1_8[1024];
unsigned int x_25_1_9;
int x_25_1_10;
int x_25_1_11;
unsigned int x_25_1_12;
int x_25_1_13;
unsigned int x_25_1_14;
char x_25_1_15[150];
int x_25_1_16;
int x_25_1_17;
unsigned int x_25_1_18 : 1;
unsigned int x_25_1_19 : 1;
unsigned int x_25_1_20 : 1;
char x_25_1_21[256];
unsigned int x_25_1_22 : 1;
unsigned int x_25_1_23 : 1;
unsigned int x_25_1_24 : 1;
unsigned int x_25_1_25 : 1;
unsigned int x_25_1_26 : 1;
unsigned int x_25_1_27;
unsigned int x_25_1_28 : 1;
unsigned int x_25_1_29 : 1;
char x_25_1_30[256];
char x_25_1_31[256];
char x_25_1_32[100];
} StatusBarRawData;
typedef struct {
bool booloverrideItemIsEnabled[29];//x1[29];
unsigned int overrideTimeString : 1;
unsigned int x3 : 1;
unsigned int x4 : 1;
unsigned int overrideServiceString: 1;//x5 : 1;
unsigned int x6 : 2;
unsigned int x7 : 1;
unsigned int x8 : 1;
unsigned int x9 : 1;
unsigned int x10 : 1;
unsigned int x11 : 1;
unsigned int x12 : 1;
unsigned int x13 : 1;
unsigned int x14 : 1;
unsigned int x15 : 1;
unsigned int x16 : 1;
unsigned int x17 : 1;
unsigned int x18 : 1;
unsigned int x19 : 1;
unsigned int x20 : 1;
unsigned int x21 : 1;
unsigned int x22 : 1;
unsigned int x23 : 1;
unsigned int x24 : 1;
StatusBarRawData values;
} StatusBarOverrideData;
I'll add an overrider for Post 9.3 and send a PR.
On my screenshots I always have a custom carrier name (usually the company name I'm working for), something like
How about providing a method like
[ [SDStatusBarManager sharedInstance] overwriteCarrierName:(NSString *)carrierName];
If that's okay for you, I would provide a pull request for that feature.
I am using the updated code on master
.
Console still prints up
Unsupported use of UIStatusBarSever SPI outside of SpringBoard. Use System Status APIs instead
.
I had a look over the #115 but still I wasn't able to set the time.
Are there any specific instructions for it?
I am using Xcode 15.
E.g. useful when making launch images. we could memset boolitemIsEnabled to zero and nuke it!
memset(overrides->booloverrideItemIsEnabled, 1, sizeof(overrides->booloverrideItemIsEnabled));
memset(overrides->values.boolitemIsEnabled, 0, sizeof(overrides->values.boolitemIsEnabled));
Works from XCode 6.3 in the 8.1 simulators, but not in the 8.3 simulators. Makes a black box show up on the header, doesn't update time, deosn't remove carrier name.
Unfortunately and quite expectedly - with iOS 10.3 it stopped working :(
How do you plan on supporting different simulator languages?
In other languages, it shows (null) instead of the time, because "9:41 AM" is not used in all other languages.
Before I make a pull request, I wanted to ask about your plans.
How about creating an NSDate using a timestamp, which works the same way in all countries and use that one to format the date?
Firstly, love this, thank you very much
I wanted to let you know that the linked page in the README, shows Wednesday September 7, as opposed to Tuesday January 9
Not sure what should be done about this, if anything, but wanted to let you know
Thanks
Dani
Thanks!
Is there any way we can automate the script so that inject
runs for each simulator, instead of running it manually for each result of xcrun <UDID>
?
In the section 'Does this work on device?', the link is broken with a 404 status: http://shinydevelopment.com/blog/status-magic-and-iphone6-screen-sizes/
Perhaps remove that link from the Readme?
I'd like to take this time to say great work on this project, thank you!
Hi,
Thanks for this amazing project.
I've been using your library around 1 year, and it's really helpful for me to create screenshots.
Apple just released the new products, and the most disgusting thing is that the iTunesConnect forces us to upload 6.5 inch screenshots and all previous 5.8 inch screenshots for iPhone X are gone and not supported. I tried your library with iPhone XS Max but it is not working. Hopefully you can fix it soon.
Thanks
Jeff
I successfully managed it to have it working in the "Debug" configuration. For some reason, I am getting a runtime error while trying to run the xuitests:
The bundle “MyProjectUITests” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.
2018-09-05 14:17:58.370499-0500 MyProjectUITests-Runner[34862:14069845] (dlopen_preflight(/Users/myuser/Library/Developer/Xcode/DerivedData/MyProject-dpjmnnjvebtcamdrvfszxtyevwbc/Build/Products/Debug-iphonesimulator/MyProjectUITests-Runner.app/PlugIns/MyProjectUITests.xctest/MyProjectUITests): Library not loaded: @rpath/SimulatorStatusMagiciOS.framework/SimulatorStatusMagiciOS
Referenced from: /Users/myuser/Library/Developer/Xcode/DerivedData/MyProject-dpjmnnjvebtcamdrvfszxtyevwbc/Build/Products/Debug-iphonesimulator/MyProjectUITests-Runner.app/PlugIns/MyProjectUITests.xctest/MyProjectUITests
Reason: image not found)
Never mind,
reading the code a bit. figure it out.
Thank you again.
Currently the time on the Widget does not get changed also. I would appreciate if this can be added somehow.
Will there be an update with 5G options? 4G is already a thing of the past in a lot of places.
I don't have a huge amount of time to maintain this project. Anyone up for helping on a more permanent basis?
@zwaldowski @kenji21 @CraigSiemens maybe? Since you've all submitted PRs with core upgrades for new OS versions in the past.
It looks like iOS 17 has removed the UIStatusBarServerListener
class which contains the override struct. It seems like the current approach used by SimulatorStatusMagic may have been eliminated in iOS 17. I'll take another stab at finding an alternative, but for now I'd say it's likely that iOS 16 will be the last version supported by SimulatorStatusMagic.
If anyone is interested in helping me investigate, you can dump the relevant iOS 17 headers by attaching the iOS 17 sim runtime at /Library/Developer/CoreSimulator/Images
(for beta 2, it's 2A5F1E26-3761-41C2-87C1-6F8415AF2C63.dmg), and then use ipsw to dump the headers for UIKitCore:
ipsw macho info -a arm64 -o /Library/Developer/CoreSimulator/Volumes/iOS_21A5248u/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ 17.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore > ~/Desktop/uikitcore.txt
Apple now requires all API calls covered by this ruleset (https://developer.apple.com/news/?id=z6fu1dcu) to be declared within a privacy manifest file.
Certain APIs, used within your app's core functionality (either in your own code or third-party SDKs), could be misused to gather device data for fingerprinting purposes. This applies regardless of user tracking permissions. To ensure transparency, Apple requires developers to describe the reasons behind using these "Required Reason" APIs in their app's privacy manifest file. Additionally, verification is needed to confirm these APIs are only used for their intended purposes.
Hi! You have a very useful tool. Do you know is it possible to use it in React Native?
I our RN-project we don't have Podfile or Xcode-project.
Thanks!
I'm using fastlane to take my screenshots for different devices and locales on iOS 17.0.1. Do you think it can be possible to integrate SimulatorStatusMagic with fastlane somehow?
I've tried disabling the override_status_bar
option in fastlane and running ./build_and_inject.sh booted
before running fastlane and it seems to be working for a few screenshots, but not all.
Would be really fantastic if an Apple Watch app were made available to do this. Simply get rid of everything except the time, and show "10:09" by default. :)
SimulatorStatusMagic doesn't work for Swift project. Please help. What I did wrong?
See what I did below.
Podfile
pod 'SimulatorStatusMagic', '~> 1.7', :configurations => ['Debug', 'AdHoc']
Bridging-Header.h
#ifdef SNAPSHOT
#import <SimulatorStatusMagic/SDStatusBarManager.h>
#endif
AppDelegate.swift
#if SNAPSHOT
SDStatusBarManager.sharedInstance().enableOverrides()
#endif
I believe only way is to overwrite respective resource (WiFi icon asset) inside iPhoneSimulator with image of 'LTE' text. Am I wrong?
Hello. I am having an issue with this project in that I can't get the status bar to work as described.
Here are the steps:
Since the work for iOS 13 has already been done by @cysp, and the product of that work is still needed (see #85) @kenji21 has suggested we do one final release of this project so this issue is to track that final merge.
Of course, knowing open-source projects they rarely go as intended and so I'd bet this isn't even nearly going to be the last merge! 😂
SF UI font is wider tha Helvetica, so my guess it that its position is being calculated based on the previous font. It's slight off center, to the right.
Hi! I'm using Simulator Status Magic on my React Native iOS app, and I got it working to some degree. I am also using Fastlane to automate my deployment. But I came across an issue where it's saying:
ERROR ITMS-90087: "Unsupported Architectures. The executable for ReactNativeWeb.app/Frameworks/SimulatorStatusMagiciOS.framework contains unsupported architectures '[x86_64, i386]'."
ERROR ITMS-90209: "Invalid Segment Alignment. The app binary at 'ReactNativeWeb.app/Frameworks/SimulatorStatusMagiciOS.framework/SimulatorStatusMagiciOS' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version."
This only happens when I try to deploy, not when I run on simulator, or on device.
Steps I used to install SimulatorStatusMagic:
Embedded Binaries
in Xcode, otherwise, it wouldn't run.I know I don't need SimulatorStatusMagic to be included when I build for the app store, but I don't want to have to manually remove/add it every time I switch between creating screenshots and archiving. Any ideas on how to get this framework to play nicely in all circumstances?
I don't know whether any of you saw this article from Toomas Vahter recently?
I wondered if it might solve the problem of SimulatorStatusMagic and release/App Store builds? It seems like it might. I'm opening this as an issue because it might make a good addition to the README file if it does indeed solve the problem.
Is it possible to add a location icon to the status bar? I tried adding it myself but I'm doing something wrong.
Thanks!
I was trying to install the SimulatorStatusMagic pod into a project that targets iOS 6.1, but got an error that it requires 7.0. The podspec in this repo says 6.0, but the Cocoapod spec seems to require 7.0. Hopefully 6.0 is supported and it just didn't get pushed up :]
Any chance we could get a CocoaPods release for this? Seems like there have been some major changes in regards to Xcode 10 that need to be released on CocoaPods.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.