This SO question covers the same general problem I have ... except that its answer is not detailed enough for me to understand what I must be doing wrong.
I am wanting to have sql files highlight any "CREATE PROCEDURE" commands.
I have the following file called sql-extension.tmLanguage in Packages\User\:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>sql</string>
</array>
<key>name</key>
<string>XYZ</string>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.create.sql</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.other.sql</string>
</dict>
<key>5</key>
<dict>
<key>name</key>
<string>entity.name.function.sql</string>
</dict>
</dict>
<key>match</key>
<string>(?i:^\s*(create)\s+(procedure)\s+)(['"`]?)(\w+)\4</string>
<key>name</key>
<string>meta.create.sql</string>
</dict>
<dict>
<key>include</key>
<string>#SQL</string>
</dict>
</dict>
<key>scopeName</key>
<string>source.sql</string>
<key>uuid</key>
<string>158e3bda-c76d-439e-b8ea-cb640f0a911c</string>
</dict>
</plist>
I copied this information from the SQL.tmLanguage file in the SQL package for ST3. Its content is this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>sql</string>
<string>ddl</string>
<string>dml</string>
</array>
<key>foldingStartMarker</key>
<string>\s*\(\s*$</string>
<key>foldingStopMarker</key>
<string>^\s*\)</string>
<key>keyEquivalent</key>
<string>^~S</string>
<key>name</key>
<string>SQL</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#comments</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.create.sql</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.other.sql</string>
</dict>
<key>5</key>
<dict>
<key>name</key>
<string>entity.name.function.sql</string>
</dict>
</dict>
<key>match</key>
<string>(?i:^\s*(create)\s+(aggregate|conversion|database|domain|function|group|(unique\s+)?index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view)\s+)(['"`]?)(\w+)\4</string>
<key>name</key>
<string>meta.create.sql</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.create.sql</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.other.sql</string>
</dict>
</dict>
<key>match</key>
<string>(?i:^\s*(drop)\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view))</string>
<key>name</key>
<string>meta.drop.sql</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.create.sql</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.other.table.sql</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>entity.name.function.sql</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>keyword.other.cascade.sql</string>
</dict>
</dict>
<key>match</key>
<string>(?i:\s*(drop)\s+(table)\s+(\w+)(\s+cascade)?\b)</string>
<key>name</key>
<string>meta.drop.sql</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.create.sql</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.other.table.sql</string>
</dict>
</dict>
<key>match</key>
<string>(?i:^\s*(alter)\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view)\s+)</string>
<key>name</key>
<string>meta.alter.sql</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.type.sql</string>
</dict>
<key>10</key>
<dict>
<key>name</key>
<string>constant.numeric.sql</string>
</dict>
<key>11</key>
<dict>
<key>name</key>
<string>storage.type.sql</string>
</dict>
<key>12</key>
<dict>
<key>name</key>
<string>storage.type.sql</string>
</dict>
<key>13</key>
<dict>
<key>name</key>
<string>storage.type.sql</string>
</dict>
<key>14</key>
<dict>
<key>name</key>
<string>constant.numeric.sql</string>
</dict>
<key>15</key>
<dict>
<key>name</key>
<string>storage.type.sql</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.type.sql</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>constant.numeric.sql</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>storage.type.sql</string>
</dict>
<key>5</key>
<dict>
<key>name</key>
<string>constant.numeric.sql</string>
</dict>
<key>6</key>
<dict>
<key>name</key>
<string>storage.type.sql</string>
</dict>
<key>7</key>
<dict>
<key>name</key>
<string>constant.numeric.sql</string>
</dict>
<key>8</key>
<dict>
<key>name</key>
<string>constant.numeric.sql</string>
</dict>
<key>9</key>
<dict>
<key>name</key>
<string>storage.type.sql</string>
</dict>
</dict>
<key>match</key>
<string>(?xi)
# normal stuff, capture 1
\b(bigint|bigserial|bit|boolean|box|bytea|cidr|circle|date|double\sprecision|inet|int|integer|line|lseg|macaddr|money|oid|path|point|polygon|real|serial|smallint|sysdate|text)\b
# numeric suffix, capture 2 + 3i
|\b(bit\svarying|character\s(?:varying)?|tinyint|var\schar|float|interval)\((\d+)\)
# optional numeric suffix, capture 4 + 5i
|\b(char|number|varchar\d?)\b(?:\((\d+)\))?
# special case, capture 6 + 7i + 8i
|\b(numeric)\b(?:\((\d+),(\d+)\))?
# special case, captures 9, 10i, 11
|\b(times)(?:\((\d+)\))(\swithoutstimeszone\b)?
# special case, captures 12, 13, 14i, 15
|\b(timestamp)(?:(s)\((\d+)\)(\swithoutstimeszone\b)?)?
</string>
</dict>
<dict>
<key>match</key>
<string>(?i:\b((?:primary|foreign)\s+key|references|on\sdelete(\s+cascade)?|check|constraint)\b)</string>
<key>name</key>
<string>storage.modifier.sql</string>
</dict>
<dict>
<key>match</key>
<string>\b\d+\b</string>
<key>name</key>
<string>constant.numeric.sql</string>
</dict>
<dict>
<key>match</key>
<string>(?i:\b(select(\s+distinct)?|insert\s+(ignore\s+)?into|update|delete|from|set|where|group\sby|or|like|and|union(\s+all)?|having|order\sby|limit|(inner|cross)\s+join|straight_join|(left|right)(\s+outer)?\s+join|natural(\s+(left|right)(\s+outer)?)?\s+join)\b)</string>
<key>name</key>
<string>keyword.other.DML.sql</string>
</dict>
<dict>
<key>match</key>
<string>(?i:\b(on|((is\s+)?not\s+)?null)\b)</string>
<key>name</key>
<string>keyword.other.DDL.create.II.sql</string>
</dict>
<dict>
<key>match</key>
<string>(?i:\bvalues\b)</string>
<key>name</key>
<string>keyword.other.DML.II.sql</string>
</dict>
<dict>
<key>match</key>
<string>(?i:\b(begin(\s+work)?|start\s+transaction|commit(\s+work)?|rollback(\s+work)?)\b)</string>
<key>name</key>
<string>keyword.other.LUW.sql</string>
</dict>
<dict>
<key>match</key>
<string>(?i:\b(grant(\swith\sgrant\soption)?|revoke)\b)</string>
<key>name</key>
<string>keyword.other.authorization.sql</string>
</dict>
<dict>
<key>match</key>
<string>(?i:\bin\b)</string>
<key>name</key>
<string>keyword.other.data-integrity.sql</string>
</dict>
<dict>
<key>match</key>
<string>(?i:^\s*(comment\s+on\s+(table|column|aggregate|constraint|database|domain|function|index|operator|rule|schema|sequence|trigger|type|view))\s+.*?\s+(is)\s+)</string>
<key>name</key>
<string>keyword.other.object-comments.sql</string>
</dict>
<dict>
<key>match</key>
<string>(?i)\bAS\b</string>
<key>name</key>
<string>keyword.other.alias.sql</string>
</dict>
<dict>
<key>match</key>
<string>(?i)\b(DESC|ASC)\b</string>
<key>name</key>
<string>keyword.other.order.sql</string>
</dict>
<dict>
<key>match</key>
<string>\*</string>
<key>name</key>
<string>keyword.operator.star.sql</string>
</dict>
<dict>
<key>match</key>
<string>[!<>]?=|<>|<|></string>
<key>name</key>
<string>keyword.operator.comparison.sql</string>
</dict>
<dict>
<key>match</key>
<string>-|\+|/</string>
<key>name</key>
<string>keyword.operator.math.sql</string>
</dict>
<dict>
<key>match</key>
<string>\|\|</string>
<key>name</key>
<string>keyword.operator.concatenator.sql</string>
</dict>
<dict>
<key>comment</key>
<string>List of SQL99 built-in functions from http://www.oreilly.com/catalog/sqlnut/chapter/ch04.html</string>
<key>match</key>
<string>(?i)\b(CURRENT_(DATE|TIME(STAMP)?|USER)|(SESSION|SYSTEM)_USER)\b</string>
<key>name</key>
<string>support.function.scalar.sql</string>
</dict>
<dict>
<key>comment</key>
<string>List of SQL99 built-in functions from http://www.oreilly.com/catalog/sqlnut/chapter/ch04.html</string>
<key>match</key>
<string>(?i)\b(AVG|COUNT|MIN|MAX|SUM)(?=\s*\()</string>
<key>name</key>
<string>support.function.aggregate.sql</string>
</dict>
<dict>
<key>match</key>
<string>(?i)\b(CONCATENATE|CONVERT|LOWER|SUBSTRING|TRANSLATE|TRIM|UPPER)\b</string>
<key>name</key>
<string>support.function.string.sql</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>constant.other.database-name.sql</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>constant.other.table-name.sql</string>
</dict>
</dict>
<key>match</key>
<string>\b(\w+?)\.(\w+)\b</string>
<!-- <string>(\w+?)\.(\w+)</string> -->
</dict>
<dict>
<key>include</key>
<string>#strings</string>
</dict>
<dict>
<key>include</key>
<string>#regexps</string>
</dict>
</array>
<key>repository</key>
<dict>
<key>comments</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.sql</string>
</dict>
</dict>
<key>match</key>
<string>(--).*$\n?</string>
<key>name</key>
<string>comment.line.double-dash.sql</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.sql</string>
</dict>
</dict>
<key>match</key>
<string>(#).*$\n?</string>
<key>name</key>
<string>comment.line.number-sign.sql</string>
</dict>
<dict>
<key>begin</key>
<string>/\*</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.sql</string>
</dict>
</dict>
<key>end</key>
<string>\*/</string>
<key>name</key>
<string>comment.block.c</string>
</dict>
</array>
</dict>
<key>regexps</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>/(?=\S.*/)</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.sql</string>
</dict>
</dict>
<key>end</key>
<string>/</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.sql</string>
</dict>
</dict>
<key>name</key>
<string>string.regexp.sql</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#string_interpolation</string>
</dict>
<dict>
<key>match</key>
<string>\\/</string>
<key>name</key>
<string>constant.character.escape.slash.sql</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>%r\{</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.sql</string>
</dict>
</dict>
<key>comment</key>
<string>We should probably handle nested bracket pairs!?! -- Allan</string>
<key>end</key>
<string>\}</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.sql</string>
</dict>
</dict>
<key>name</key>
<string>string.regexp.modr.sql</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#string_interpolation</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>string_escape</key>
<dict>
<key>match</key>
<string>\\.</string>
<key>name</key>
<string>constant.character.escape.sql</string>
</dict>
<key>string_interpolation</key>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.sql</string>
</dict>
</dict>
<key>match</key>
<string>(#\{)([^\}]*)(\})</string>
<key>name</key>
<string>string.interpolated.sql</string>
</dict>
<key>strings</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.sql</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.sql</string>
</dict>
</dict>
<key>comment</key>
<string>this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.</string>
<key>match</key>
<string>(')[^'\\]*(')</string>
<key>name</key>
<string>string.quoted.single.sql</string>
</dict>
<dict>
<key>begin</key>
<string>'</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.sql</string>
</dict>
</dict>
<key>end</key>
<string>'</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.sql</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.single.sql</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#string_escape</string>
</dict>
</array>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.sql</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.sql</string>
</dict>
</dict>
<key>comment</key>
<string>this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.</string>
<key>match</key>
<string>(`)[^`\\]*(`)</string>
<key>name</key>
<string>string.quoted.other.backtick.sql</string>
</dict>
<dict>
<key>begin</key>
<string>`</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.sql</string>
</dict>
</dict>
<key>end</key>
<string>`</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.sql</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.other.backtick.sql</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#string_escape</string>
</dict>
</array>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.sql</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.sql</string>
</dict>
</dict>
<key>comment</key>
<string>this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.</string>
<key>match</key>
<string>(")[^"#]*(")</string>
<key>name</key>
<string>string.quoted.double.sql</string>
</dict>
<dict>
<key>begin</key>
<string>"</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.sql</string>
</dict>
</dict>
<key>end</key>
<string>"</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.sql</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.double.sql</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#string_interpolation</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>%\{</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.sql</string>
</dict>
</dict>
<key>end</key>
<string>\}</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.sql</string>
</dict>
</dict>
<key>name</key>
<string>string.other.quoted.brackets.sql</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#string_interpolation</string>
</dict>
</array>
</dict>
</array>
</dict>
</dict>
<key>scopeName</key>
<string>source.sql</string>
<key>uuid</key>
<string>C49120AC-6ECC-11D9-ACC8-000D93589AF6</string>
</dict>
</plist>
I got the uuid from typing the following in the console:
import uuid
u = uuid.uuid4()
and then copy/pasting the UUID created into the file.
After saving the file and viewing a sql file, I get this (notice that the words "CREATE PROCEDURE" are not highlighted):
So what am I doing wrong?
EXTRA NOTE:
the AAAPackageDev package does not seem to work in ST3. All the menu options are greyed out.
For the following, I'm guessing you are using Windows, but if you aren't let me know (or find the command yourself). First, for the sake of demonstration, place the cursor over TABLE. Then press ctrl+alt+shift+p. In the status bar you will notice some text appear (something like source.sql meta.create.sql keyword.other.sql). This is the scope being applied to that word. The scope, along with your tmTheme file, define how it will be colored. Now place the cursor over PROCEDURE and repeat. You should see something similar to the scopes previously seen. If not, there is likely something wrong with your regular expression.
Oh, I would also add SQL to your ignored_packages setting if you haven't already. This will ensure that your syntax file is being used, not the built in one. You will probably want to copy out the contents of that package too as they probably provide some additional functionality.
AAAPackageDev is not compatible with ST3. ST3 uses Python3, whereas ST2 used Python2. So I wouldn't blindly expect a plugin to be compatible with both. Anyways, I'll try to provide some guidance on syntax highlighting (I'm no expert though). The first thing worth checking is that your regular expressions are correct. That is, you need to ensure the proper scopes are being applied to CREATE PROCEDURE.
In case you like to work in JSON rather than XML, take a look at PlistJsonConverter. It is compatible with ST3, though you will need to use the ST3 branch of it.
Edit
Leads me to believe there is something wrong with your regex. Is there any reason you don't just change
<string>(?i:^\s*(create)\s+(aggregate|conversion|database|domain|function|group|(unique\s+)?index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view)\s+)(['"`]?)(\w+)\4</string>
to
<string>(?i:^\s*(create)\s+(aggregate|conversion|database|domain|function|group|(unique\s+)?index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view)\s+)(['"`]?)(\w+)\4</string>
I simply added procedure to an existing regex pattern.
Related
Google AdMob 9.11.0
XCode 14.0.1
XCode Simulator 14.0.1
Simulated Device iPhone 14 Pro Max
Simulated Device OS iOS 16
I am new to Google AdMob. I have a dummy app and have added the required XCFrameworks and updated my plist (in the info section of the project settings, which creates a *.plist file with just the custom *.plist entries). When I try and build and run the app without really any Google AdMob code, it complies clean, but then fails trying to load the app to the simulator. It does the same with any simulator version I choose, and the same on my native device (which is an Xr). Here is the error I get in XCode;
Unable To Install AdMobTest - Please try again later.
Failed to load Info.plist from bundle at path /Users/gar/Library/Developer/CoreSimulator/Devices/73AB96E0-A18C-48EC-AC15-F7D8A703FDC4/data/Library/Caches/com.apple.mobile.installd.staging/temp.AFlmNx/extracted/AdMobTest.app/Frameworks/GoogleMobileAds.framework; Extra info about "/Users/gar/Library/Developer/CoreSimulator/Devices/73AB96E0-A18C-48EC-AC15-F7D8A703FDC4/data/Library/Caches/com.apple.mobile.installd.staging/temp.AFlmNx/extracted/AdMobTest.app/Frameworks/GoogleMobileAds.framework/Info.plist": Couldn't stat /Users/gar/Library/Developer/CoreSimulator/Devices/73AB96E0-A18C-48EC-AC15-F7D8A703FDC4/data/Library/Caches/com.apple.mobile.installd.staging/temp.AFlmNx/extracted/AdMobTest.app/Frameworks/GoogleMobileAds.framework/Info.plist: No such file or directory"
It looks like XCode is failing to propigate the *.plist to the target device, but I have no idea why. Does anyone have any idea why this would be the case, or have seen this before. I am not sure it is really a AdMob issue so much as it is a custom *.plist entry issue, but I am not sure.
Here is the *.plist in question (in full).
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-....</string>
<key>SKAdNetworkItems</key>
<array>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>cstr6suwn9.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>4fzdc2evr5.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>2fnua5tdw4.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>ydx93a7ass.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>5a6flpkh64.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>p78axxw29g.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>v72qych5uu.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>c6k4g5qg8m.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>s39g8k73mm.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>3qy4746246.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>3sh42y64q3.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>f38h382jlk.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>hs6bdukanm.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>prcb7njmu6.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>v4nxqhlyqp.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>wzmmz9fp6w.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>yclnxrl5pm.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>t38b2kh725.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>7ug5zh24hu.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>9rd848q2bz.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>n6fk4nfna4.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>kbd757ywx3.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>9t245vhmpl.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>4468km3ulz.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>2u9pt9hc89.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>8s468mfl3y.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>av6w8kgt66.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>klf5c3l5u5.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>ppxm28t8ap.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>424m5254lk.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>uw77j35x4d.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>578prtvx9j.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>4dzt52r2t5.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>e5fvkxwrpn.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>8c4e2ghe7u.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>zq492l623r.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>3qcr597p9d.skadnetwork</string>
</dict>
</array>
</dict>
</plist>
Thanks in advance for any help, pointers, ideas, or links you can provide. Have a great day.
After the last update, without any change in code, my app will no longer appear in the "open in" menu. Has something changed in managing file types? My file is now associated with google drive and other generic apps!
Thank you for any help...
My code:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFiles</key>
<array/>
<key>CFBundleTypeName</key>
<string>Pin The World 2 File</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>LSItemContentTypes</key>
<array>
<string>com.valgy.PintheWorld2</string>
</array>
</dict>
</array>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeDescription</key>
<string>Pin The World 2 File</string>
<key>UTTypeIdentifier</key>
<string>com.valgy.PintheWorld2</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<string>p2w</string>
<key>public.mime-type</key>
<string>application/PintheWorld2</string>
</dict>
</dict>
</array>
I'm trying to set the document type (the Kind field in the Finder get info field), but it still lists the placeholder DocumentType even with this:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>dotpaint</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>docIcon.png</string>
<key>CFBundleTypeName</key>
<string>dotpaint Document</string>
<key>CFBundleTypeOSTypes</key>
Am I doing anything wrong?
Have you tried exporting your custom UTI type in the .plist file? Take a look at UTExportedTypeDeclarations in Apple's docs. Should be something like this:
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeDescription</key>
<string>My file type</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string> // ... or whatever you want it to conform to
</array>
<key>UTTypeIdentifier</key>
<string>com.mycompany.myapp</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>dotpaint</string>
</array>
</dict>
</dict>
</array>
I have the following in my Cordova.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeyboardDisplayRequiresUserAction</key>
<true/>
<key>SuppressesIncrementalRendering</key>
<false/>
<key>UIWebViewBounce</key>
<false/>
<key>TopActivityIndicator</key>
<string>gray</string>
<key>EnableLocation</key>
<false/>
<key>EnableViewportScale</key>
<false/>
<key>AutoHideSplashScreen</key>
<true/>
<key>ShowSplashScreenSpinner</key>
<true/>
<key>MediaPlaybackRequiresUserAction</key>
<false/>
<key>AllowInlineMediaPlayback</key>
<false/>
<key>OpenAllWhitelistURLsInWebView</key>
<false/>
<key>BackupWebStorage</key>
<string>cloud</string>
<key>ExternalHosts</key>
<array/>
<key>item 0</key>
<string>*</string>
<key>Plugins</key>
<dict>
<key>NavigationBar</key>
<string>NavigationBar</string>
<key>EmailComposer</key>
<string>EmailComposer</string>
<key>Device</key>
<string>CDVDevice</string>
<key>TabBar</key>
<string>TabBar</string>
<key>Logger</key>
<string>CDVLogger</string>
<key>Compass</key>
<string>CDVLocation</string>
<key>Accelerometer</key>
<string>CDVAccelerometer</string>
<key>Camera</key>
<string>CDVCamera</string>
<key>NetworkStatus</key>
<string>CDVConnection</string>
<key>Contacts</key>
<string>CDVContacts</string>
<key>Debug Console</key>
<string>CDVDebugConsole</string>
<key>Echo</key>
<string>CDVEcho</string>
<key>File</key>
<string>CDVFile</string>
<key>FileTransfer</key>
<string>CDVFileTransfer</string>
<key>Geolocation</key>
<string>CDVLocation</string>
<key>Notification</key>
<string>CDVNotification</string>
<key>Media</key>
<string>CDVSound</string>
<key>Capture</key>
<string>CDVCapture</string>
<key>SplashScreen</key>
<string>CDVSplashScreen</string>
<key>Battery</key>
<string>CDVBattery</string>
<key>Globalization</key>
<string>CDVGlobalization</string>
</dict>
</dict>
</plist>
I have added * as an external host which previously has always worked without issue, I am using Cordova 2.2.0 and when trying to make AJAX calls I am getting the White-list error.
I don't see where I am going wrong!
I have changed this part of the XML -
<array/>
<key>item 0</key>
<string>*</string>
To this -
<key>ExternalHosts</key>
<array>
<string>*</string>
</array>
I'm working with launchd to run some automated tasks, and I was wondering what the difference is between 'Day' and 'Weekday'.
According to http://discussions.apple.com/thread.jspa?threadID=1361809 there is a 'subtle' difference that can cause launchd to misbehave.
Ultimately, I'd like to have a plist that runs every weekday (Mon - Fri) at 8am, but I don't know how to get the cron equivalent of
0 8 * * 1-5
Day is the day of the month.
Weekday is the day of the week (0 and 7 == Sunday).
For you, you need:
<key>StartCalendarInterval</key>
<array>
<dict>
<key>Weekday</key>
<integer>1</integer>
<key>Hour</key>
<integer>8</integer>
<key>Minute</key>
<integer>0</integer>
</dict>
<dict>
<key>Weekday</key>
<integer>2</integer>
<key>Hour</key>
<integer>8</integer>
<key>Minute</key>
<integer>0</integer>
</dict>
<dict>
<key>Weekday</key>
<integer>3</integer>
<key>Hour</key>
<integer>8</integer>
<key>Minute</key>
<integer>0</integer>
</dict>
<dict>
<key>Weekday</key>
<integer>4</integer>
<key>Hour</key>
<integer>8</integer>
<key>Minute</key>
<integer>0</integer>
</dict>
<dict>
<key>Weekday</key>
<integer>5</integer>
<key>Hour</key>
<integer>8</integer>
<key>Minute</key>
<integer>0</integer>
</dict>
</array>
Not quite as elegant as cron...
try this too. Working for me!
<key>StartCalendarInterval</key>
<dict>
<key>Minute</key>
<integer>00</integer>
<key>Hour</key>
<integer>22</integer>
<key>Weekday</key>
<integer>12345</integer>
</dict>
You should be able to use hyphens to specify ranges as well:
<key>StartCalendarInterval</key>
<array>
<dict>
<key>Weekday</key>
<integer>1-5</integer>
<key>Hour</key>
<integer>8</integer>
<key>Minute</key>
<integer>0</integer>
</dict>
</array>
I didn't test this though. (Source: http://www.launchd.info/)