Skip to content

Commit 791707b

Browse files
committed
[dev app] update button to provide IDs
* There's a button that doesn't do anything, popup the OSID and push sub ID. This helps with users of the built example apps on TestFlight
1 parent 021a767 commit 791707b

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

iOS_SDK/OneSignalDevApp/OneSignalDevApp/Base.lproj/Main.storyboard

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
33
<device id="retina5_5" orientation="portrait" appearance="light"/>
44
<dependencies>
55
<deployment identifier="iOS"/>
6-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
77
<capability name="System colors in document resources" minToolsVersion="11.0"/>
88
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
99
</dependencies>
@@ -26,13 +26,13 @@
2626
<rect key="frame" x="0.0" y="0.0" width="375" height="2500"/>
2727
<subviews>
2828
<button opaque="NO" contentMode="scaleToFill" selected="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Kp7-Oh-BQ1" userLabel="Update App Id">
29-
<rect key="frame" x="140.66666666666666" y="202" width="94" height="30"/>
29+
<rect key="frame" x="164" y="202" width="47" height="30"/>
3030
<constraints>
3131
<constraint firstAttribute="height" constant="30" id="aq3-BI-YWl"/>
3232
</constraints>
3333
<fontDescription key="fontDescription" name=".AppleSystemUIFont" family=".AppleSystemUIFont" pointSize="15"/>
3434
<color key="tintColor" red="1" green="0.1367101157" blue="0.01701983743" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
35-
<state key="normal" title="Does Nothing"/>
35+
<state key="normal" title="Info✨"/>
3636
<connections>
3737
<action selector="updateAppId:" destination="BYZ-38-t0r" eventType="touchUpInside" id="8zv-f6-YnT"/>
3838
</connections>
@@ -760,7 +760,7 @@
760760
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
761761
</systemColor>
762762
<systemColor name="systemGreenColor">
763-
<color red="0.20392156862745098" green="0.7803921568627451" blue="0.34901960784313724" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
763+
<color red="0.20392156859999999" green="0.78039215689999997" blue="0.34901960780000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
764764
</systemColor>
765765
</resources>
766766
</document>

iOS_SDK/OneSignalDevApp/OneSignalDevApp/ViewController.m

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,13 @@ - (void)changeAnimationState:(BOOL)animating {
5757
self.activityIndicatorView.hidden = !animating;
5858
}
5959

60-
- (IBAction)updateAppId:(id)sender {
61-
// [AppDelegate setOneSignalAppId:self.appIdTextField.text];
62-
NSLog(@"Dev App: Not a feature, can't change app id, no op!");
60+
- (IBAction)updateAppId:(id)sender {
61+
NSLog(@"Dev App Info");
62+
#pragma clang diagnostic push
63+
#pragma clang diagnostic ignored "-Wdeprecated"
64+
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"OSID + SubID" message:[NSString stringWithFormat:@"%@, %@", OneSignal.User.onesignalId, OneSignal.User.pushSubscription.id] delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:@"Cool", nil];
65+
[alert show];
66+
#pragma clang diagnostic pop
6367
}
6468

6569
- (IBAction)addTriggerAction:(id)sender {

0 commit comments

Comments
 (0)